Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

link error: unresolved

leeheeg
Beginner
327 Views
My code works well on gcc, but doesn'ton icc.
...:warning #266:function declared implicitly
swab(....);
IPO Error: unresolved : swaw
Referenced in ....
in header file,'swab' and 'swaw' function are defined like
#define swab _swab
#if defined(_cplusplus)
extern "C"{
void swaw (short *form, short *to, int length);
}
#end if
link option is given like this:
icc xxx.o xxx.o -cxxlib-gcc -limf -O3
what's wrong?
0 Kudos
1 Reply
JenniferJ
Moderator
327 Views

should use "icpc" because of the "#ifdef _cplusplus".

Jennifer

0 Kudos
Reply