I'm using intel 12.0 on RHEL 5.8
I'm trying to build a shared libary that's a mix of C and C++ files. I can't get it to link. Here's the build, and the errors:
icc
-std=c99 -I/opt/crc/R/R-2.15.0-intel/inst/lib64/R/include -DNDEBUG
-I/usr/local/include -fpic -g -O2 -std=c99 -c csemnlm.c -o
csemnlm.o
icc -std=c99
-I/opt/crc/R/R-2.15.0-intel/inst/lib64/R/include -DNDEBUG
-I/usr/local/include -fpic -g -O2 -std=c99 -c uncmin.c -o uncmin.o
icpc -I/opt/crc/R/R-2.15.0-intel/inst/lib64/R/include -DNDEBUG -I/usr/local/include -fpic -g -O2 -c csem.cpp -o csem.o
icpc
-L/usr/local/lib64 -o sem.so csemnlm.o uncmin.o csem.o -g -O2 -lm
-L/opt/crc/R/R-2.15.0-intel/inst/lib64/R/lib -lRlapack
-L/opt/crc/R/R-2.15.0-intel/inst/lib64/R/lib -lRblas -lifport -lifcore
-limf -lsvml -lm -lipgo -lirc -lpthread -lirc_s -ldl
-L/opt/crc/R/R-2.15.0-intel/inst/lib64/R/lib -lR
/afs/crc.nd.edu/x86_64_linux/intel/12.0/composerxe-2011.2.137/compiler/lib/intel64/libimf.so:
warning: warning: feupdateenv is not implemented and will always fail
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
make: *** [sem.so] Error 1
Since
the error comes trying to link a to gcc library on the system, my first
guess is that cpc is having troubles doing this ( I've see old postings
to this effect.)
My Second guess would be that I can't us cpc to link c and C++
Any ideas appreciated,
Mark



