I'm trying to compile C++ source that requires a number of libraries. Unfortuantly two libraries contain definitions for the same symbol and results in an error. Is there a way to specify which library take preference in the symbol definition?
I know this is not strictly exclusively a Mac orientated question, but I am compiling on OS X so thought here might be a good place to start. Thanks for any help. Below is a printout of the error I receive:
Input:
/usr/local/mpich-1.2.7/bin/mpicxx -g -O2 -o mpifxcorr mpifxcorr.o fxmanager.o core.o datastream.o visibility.o configuration.o uvw.o mode.o mk5.o polyco.o -Wl,-bind_at_load -L/Library/Frameworks/Intel_IPP.framework/Versions/Current/lib/ -L/Library/Frameworks/Intel_IPP.framework/Versions/Current/lib -L/Users/andrewwoods/corr/rpfits/ -L/Users/andrewwoods/corr/vlba_utils/ -lipps -lguide -lippvm -lvlba_utils -lrpfits -lg2c -lm
Output
/usr/bin/ld: multiple definitions of symbol ___divdi3
/usr/local/lib/libg2c.dylib(_divdi3.o) definition of ___divdi3
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libgcc_s.10.4.dylib(_divdi3_s.o) definition of ___divdi3
collect2: ld returned 1 exit status
I know this is not strictly exclusively a Mac orientated question, but I am compiling on OS X so thought here might be a good place to start. Thanks for any help. Below is a printout of the error I receive:
Input:
/usr/local/mpich-1.2.7/bin/mpicxx -g -O2 -o mpifxcorr mpifxcorr.o fxmanager.o core.o datastream.o visibility.o configuration.o uvw.o mode.o mk5.o polyco.o -Wl,-bind_at_load -L/Library/Frameworks/Intel_IPP.framework/Versions/Current/lib/ -L/Library/Frameworks/Intel_IPP.framework/Versions/Current/lib -L/Users/andrewwoods/corr/rpfits/ -L/Users/andrewwoods/corr/vlba_utils/ -lipps -lguide -lippvm -lvlba_utils -lrpfits -lg2c -lm
Output
/usr/bin/ld: multiple definitions of symbol ___divdi3
/usr/local/lib/libg2c.dylib(_divdi3.o) definition of ___divdi3
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libgcc_s.10.4.dylib(_divdi3_s.o) definition of ___divdi3
collect2: ld returned 1 exit status