[Coin-discuss] Compile BCP 1.0.0 with mpich

Laszlo Ladanyi ladanyi at us.ibm.com
Mon Nov 27 20:58:46 EST 2006


Oops.. my fault... In the past only one of BCP_message_single.cpp and
BCP_message_mpi.cpp was compiled and linked into the code. Therefore the
BCP_process destructor was defined in both of these sources (and in ..._pvm as
well). Basically, I just didn't want to create a separate source file for 4
lines of code...

However, now all available interfaces are linked into the library and the user
can choose. So it's an error to define the destructor everywhere. Since the
single interface is always available, the destructor should be defined there
and nowhere else. Just remove it from _mpi.cpp and you should be OK.

--Laci

On Mon, 27 Nov 2006, Dan Chen wrote:

> Now I got a linking error:
>    
>   ld: fatal: symbol `BCP_process::~BCP_process()' is multiply-defined:
>         (file .libs/BCP_message_single.o type=FUNC; file .libs/BCP_message_mpi.o type=FUNC);
> ld: fatal: symbol `BCP_process::~BCP_process()' is multiply-defined:
>         (file .libs/BCP_message_single.o type=FUNC; file .libs/BCP_message_mpi.o type=FUNC);
> ld: fatal: symbol `BCP_process::~BCP_process()' is multiply-defined:
>         (file .libs/BCP_message_single.o type=FUNC; file .libs/BCP_message_mpi.o type=FUNC);
> ld: fatal: File processing errors. No output written to .libs/libBcp.so.0.0.0
> collect2: ld returned 1 exit status
>    
>   Dan
> 
> Laszlo Ladanyi <ladanyi at us.ibm.com> wrote:
>   Yes, that should be there...
> 
> --Laci
> 
> On Sun, 26 Nov 2006, Dan Chen wrote:
> 
> > Hi folks,
> > 
> > I got error again. Should I add '#include BCP_process.hpp' into BCP_message_mpi.cpp?
> > 
> > Thanks,
> > 
> > Dan
> > 
> > if /bin/bash ../libtool --tag=CXX --mode=compile /home/dbremner/bin/g++ -DHAVE_CONFIG_H -I. -I`echo ../../../Bcp/src/include` -I../inc -I`echo /home/dchen/scratch/Bcp-1.0.0/CoinUtils/src` -I`echo /home/dchen/scratch/Bcp-1.0.0/buildp2/Bcp/../CoinUtils/inc` -I`echo /home/dchen/scratch/Bcp-1.0.0/Osi/src` -I`echo /home/dchen/local/include` -O3 -fomit-frame-pointer -pipe -DNDEBUG -Wimplicit -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -MT BCP_message_mpi.lo -MD -MP -MF ".deps/BCP_message_mpi.Tpo" -c -o BCP_message_mpi.lo `test -f 'Member/BCP_message_mpi.cpp' || echo '../../../Bcp/src/'`Member/BCP_message_mpi.cpp; \
> > then mv -f ".deps/BCP_message_mpi.Tpo" ".deps/BCP_message_mpi.Plo"; else rm -f ".deps/BCP_message_mpi.Tpo"; exit 1; fi
> > /home/dbremner/bin/g++ -DHAVE_CONFIG_H -I. -I../../../Bcp/src/include -I../inc -I/home/dchen/scratch/Bcp-1.0.0/CoinUtils/src -I/home/dchen/scratch/Bcp-1.0.0/buildp2/Bcp/../CoinUtils/inc -I/home/dchen/scratch/Bcp-1.0.0/Osi/src -I/home/dchen/local/include -O3 -fomit-frame-pointer -pipe -DNDEBUG -Wimplicit -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -MT BCP_message_mpi.lo -MD -MP -MF .deps/BCP_message_mpi.Tpo -c ../../../Bcp/src/Member/BCP_message_mpi.cpp -fPIC -DPIC -o .libs/BCP_message_mpi.o
> > ../../../Bcp/src/Member/BCP_message_mpi.cpp:17: error: expected constructor, destructor, or type conversion before '::' token
> > *** Error code 1
> > make: Fatal error: Command failed for target `BCP_message_mpi.lo'
> > 
> > 
> > 
> > ---------------------------------
> > Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail 
> 
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
> 
> 
>  				
> ---------------------------------
> Make free worldwide PC-to-PC calls. Try the new Yahoo! Canada Messenger with Voice




More information about the Coin-discuss mailing list