
AMDG On 02/08/2012 09:28 AM, Abdo Haji-Ali wrote:
Hello,
I downloaded and compiled boost successfully by calling b2 (version 1.47 for various reasons) Then I tried compiling my program (which uses both Boost.MPI and Boost.Serialization) using
mpic++ -I/home/abdo/boost/ -L/home/abdo/boost/stage/lib/ -lboost_serialization -lboost_mpi main.cpp
But I keep getting linking errors in boost, for example: undefined reference to `boost::mpi::communicator::size() const' undefined reference to `typeinfo for boost::archive::detail::basic_oserialize
I have openmpi installed and I'm able to run simple non-boost OpenMPI programs. I'm also sure that the libraries in my stage library are the ones used, since if I remove the -L argument the compiler complains about -lboost_mpi and -lboost_serialization
Is there something I'm missing here?
I'm using Ubuntu 11.10
The linker requires that libraries come after anything that depends on them. Try mpic++ ... main.cpp -lboost_mpi -lboost_serialization In Christ, Steven Watanabe