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

ld: duplicate symbol linking error

Kevin_Wilson
Beginner
411 Views
Hello,

I am getting the following linking error while compiling my code:

ld: duplicate symbol ___intel_cpu_indicator$non_lazy_pointer

I am unsure how to interpret this, and would like any advise on where to look for a correction.

My command line argument are the following:

-parallel -O3 -ip -m64 -static-intel -fPIC

Thank you for any help,
Kevin
0 Kudos
3 Replies
mecej4
Honored Contributor III
411 Views
The linker message is very clear: you asked it to link some object files and some libraries, among which the linker found more than one instance of the named symbol, and it is refusing to select one of them for you.

If you show us the command line that produced the message, perhaps some help may be provided.
0 Kudos
aazue
New Contributor I
411 Views
Hi
I don't know if you using an Makefile but
I think -fPIC after Intel lib can be interpreted
strange ...( also static ....)
test with -fPIC as first parameter or without flag and see the weight binary
Icpc -fPIC ........
sometime with (make) for solve similar problems is required to use env compiler for inform flags separate.
example:
CXXFLAGS= -m64 -fPIC
Regards

0 Kudos
Kevin_Wilson
Beginner
411 Views
Thank you for responses.

I have fixed the issue by downgrading to XCode 3.2.1 from 3.2.2, and reinstalling the intel compiler. The idea came from the following article:
http://software.intel.com/en-us/articles/intel-fortran-for-mac-os-x-incompatible-with-xcode-322/

I am unsure how closely the above issue relates to mine, but it worked.

For reference I was compiling the ITK toolkit, which uses CMake to generate the Makefile, and using the arguments described above.

- Kevin
0 Kudos
Reply