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

linking problem, now

bbp
Beginner
368 Views
Ok, now compilation went semi-fine :)

The project doesn't link, ld complains about not finding the "main" symbol. So do I :) When I look at the generated objects with nm, I don't see _any_ exported nor imported symbol. For instance, with common.o:

$ nm common.o
$

And the same is true for all objects I generated with icc. However, on the same tree compiled with gcc, I have a bunch of functions in common.o. Maybe it's due to the way I run icc?

Here is the command line:

/opt/intel_cc_80/bin/icc -O3 -O3 -ipo -finline-functions -rcd -tpp6 -mcpu=pentiumpro -xK -march=pentiumiii -unroll100000 -g0 -I/usr/local/foo/include -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o common.o common.c

Then, linkage is done by /usr/bin/ld. Do I have to use another linker?
0 Kudos
1 Reply
Maximillia_D_Intel
368 Views
Hi,
If you are doing an ipo compilation, the compilation with -c is a pseudo compiler - you are seeing what is expected in the object files, I believe.
If you do use ipo, it is important to use icc -ipo to perform the link as the actual compilation occurs during the link step.
Hope this helps.
Max
0 Kudos
Reply