I'm compiling an FFT package with VC++7.1 + Intel C++ compiler, which contains two different rand0.c files in different directories. These files are not identical, however they contain a static function (applicable_vec) with the same name, the same type, and the same arguments (somehow, the contents are the same!! completely identical functions in two files defined as static!). When this package is compiled with /Qipo option, I got an error upon linking, _applicable_vec.2 was defined in two rank0.obj's in two libraries. I looked at the source files, and confirmed they are both static.
I suspected /Qipo option should make this problem, because this option notify the linker of the location of every function. I tried to build without /Qipo option, and it went fine! as a matter of course.
Next, I added /Qipo and changed the name of that function in one of the two files (added "_" in the tail) and found the compiler/linker didn't give error messages. So this function's name made the problem. And that it's public.
I guess it may be a feature, but wonder how I can avoid this error without modifying the name of the function or removing /Qipo option. Otherwise "static" function isn't static...
BTW I compiled this package also on Linux, but I had no problem...but I forgot the detail.
Message Edited by maverick6664 on 05-07-2005 05:19 PM