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

Linking error with icc 8.0/SuS/EM64T

rvwilson
Beginner
276 Views
I am getting the following linking errors when I attempt to build an executable:

/usr/bin/ld: skipping incompatible ../libunsio/libunsio.a when searching for -lunsio
/usr/bin/ld: cannot find -lunsio

With typical compiler command line options:

/usr/local/intel/compiler80/bin/icc -O3 -fno-alias -fno-fnalias -tpp7 -xW -fp -unroll -Ob2 -ip -fPIC -Duxint=int -DLINUX -DSIMC_DOUBLE -Duxreal=double -Duxjacreal=float -I/usr/local/include -I/usr/local/hdf5/include -I../libswiss -I../libunsio -I../libuns -I../libparuns -I../libuxinput -I../libsdb -I../libh5layer -I../libdistfunc -I../libuxuser -I../libNISTThermo -I/usr/local/mpich-1.2.6/include -I. -c multigrid.C

Even though the compiler was able to successfully compile the ../libunsio/libunsio.a library. I am using SuSe Linux v9.2 and running with a EM64T Xeon processor. I assume that the problem is that the libunsio.a library if not compatiable due to 32bit-vs-64bit issues. If this is the case, do you have any ideas about how to fix this problem?

Thanks,
Bob
0 Kudos
1 Reply
TimP
Honored Contributor III
276 Views
Yes, the files to be linked together must be all 32-bit or all 64-bit. If you are using the 32-bit icc, the linker will skip over 64-bit libraries and produce the message you quoted. If you have available 64-bit libraries of everything for which you don't have source code, you must be running on the x86-64 OS. You should upgrade to the 64-bit 8.1 or 9.0 icc, or get all 32-bit libraries. If you need to check your system for existence of 32- and 64-bit library versions, you could use the find and file commands.
0 Kudos
Reply