After switching from the 8.1 compiler version to the latest one, we're having linker issues compiling our project under Redhat linux using the 3.2 version of the standard lib.
It seems that these problems have something to do with C code compiles, although I'm having troubles finding the exact source. Maybe anyone can help me out.
The linker problems show up like this:
Image.o(.text+0x1e16): In function 'my_error_exit(jpeg_common_struct*)'
Image.cpp:1028: undefined reference to `scaleImage'
"nm" gives me the following symbols:
"nm -C Image.o |grep scaleImage":
"nm -C scale.o |grep scaleImage":
00000000 T scaleImage(unsigned, int, int, unsigned, void const*, int, int, unsigned, void*)
00000000 d _Z10scaleImagejiijPKviijPv$$LSDA
Any help would be appreciated.
Somehow this worked in earlier versions, although I'm not sure why.
Anyway, problem solved :-)
Glad you figured this out. As you figured out, icpc compiles as C++ code, so uses C++ "mangled" names for functions, whereas icc compiles a C code, and just gives the function name. I tried with the latest 8.1 compilers (8.1.036) and I see the same behavior. Perhaps you were using an older 8.1 compiler ? gcc and g++ have the same behavior, ie g++ compiles C source files as C++.