Software Archive
Read-only legacy content
17061 Discussions

error when using icpc to compile a program which uses coi library

songlinhai
Beginner
555 Views

hi,

   I got the following error, when use icpc to compile a program which is using coi library.

ld: skipping incompatible /opt/intel/mic/coi/device-linux-debug/lib/libcoi_device.so when searching for -lcoi_device
ld: cannot find -lcoi_device

The command I use is 

icpc -L/opt/intel/mic/coi/device-linux-debug/lib -I /opt/intel/mic/coi/include -I ../../../include -lcoi_device -lpthread -rdynamic -Wl,--enable-new-dtags -g -O0 -D_DEBUG -openmp -DTHREADS=200 -openmp-report -o debug/kmeans-seq-sink kmeans-seq-sink.c

    any hints or suggestions?

    thanks a lot!

0 Kudos
1 Reply
Kevin_D_Intel
Employee
555 Views

To use icpc for the sink-side (or device side) compilation, add: -mmic

That will yield using the compatible compiler and linker to the libs you referenced. Without this option you are mixing the host-side compiler/linker with device-side libraries which are not compatible.

0 Kudos
Reply