Link user-defined static and shared libraries with ipo option failed

Link user-defined static and shared libraries with ipo option failed

I have multiple libraries need to be linked together:

icpc libS1.a.......libS2.a -LDynamic_Lib_Path -lDynamic_Lib_Name -ipo-jobs8 -o Executable

I gotthe followingerror

ld: Executable: hidden symbol `_ZTI23CLASS_NAME' in /tmp/ipo_icpcSOdsbw.o is referenced by DSO
ld: final link failed: Nonrepresentable section on output

I checked the dynamic library and found an undefined symbol:

nm -C Dynamic_Lib

U typeinfo for CLASS_NAME

The definition of theCLASS_NAME used in the dynamic library is in the file of the static libraries. Same source code can be linked successfully without problem either without ipo (in the compiling phase) or replacing the dynamic lib with a static one.

I have no clue howto fix the problem,or I need to do something special to link.

I tried both Intel 10.1 and 9.0 compilers without luck. The program can be easily built with Sun's compiler.

Thanks for your help

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.