- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
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":
U 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.
Cheers,
ALex
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":
U 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.
Cheers,
ALex
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok I tracked down the problem. I compiled all code with icpc instead of using icc for the C code.
Somehow this worked in earlier versions, although I'm not sure why.
Anyway, problem solved :-)
- ALex
Somehow this worked in earlier versions, although I'm not sure why.
Anyway, problem solved :-)
- ALex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ALex,
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++.
regards,
_|ohnO
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page