I am building a Mathematica interface to my c++ program. My makefile and source are available at github. This is the line that invokes wscc
,
wscc -b64 -o math.exe math.tm math.c thermal_funcs.o zeta.o -lgsl -lgslcblas $(MATH_INC)
The *.o
object files are linked successfully and math.exe
is built by wscc
. However, during the compilation stage, it appears that the object files are still passed to my C-compiler (they should only be passed during linking), such that I receive warnings:
math.c: gcc: warning: thermal_funcs.o: linker input file unused because linking not done
gcc: warning: zeta.o: linker input file unused because linking not done
math.exe.tm.c: gcc: warning: thermal_funcs.o: linker input file unused because linking not done
gcc: warning: zeta.o: linker input file unused because linking not done
I guess they are innocuous and the resulting executable math.exe
works as expected. You can produce similar warnings by running
gcc -c test.c test.o
upon emtpy files test.c
and test.o
It seems like a (fairly harmless) bug in wscc
, as it shouldn't be passing object files to gcc -c
commands. But maybe I am doing something wrong?
wscc
/mcc
. You can usewsprep
to "compile" the.tm
template to a.c
file, then compile that file in a second step (and perhaps do the linking in a third). The point ofwscc
is to avoid typing multiple commands. If you have a makefile anyway, it's more a hindrance to try to combine everything into a single command. $\endgroup$