Boost logo

Boost Users :

Subject: Re: [Boost-users] Linking errors
From: Brian Vandenberg (phantall+boost_at_[hidden])
Date: 2012-02-08 19:57:36

> The linker requires that libraries come after
> anything that depends on them. Try
> mpic++ ... main.cpp -lboost_mpi -lboost_serialization

 Assuming you're using the GNU linker editor, you can also do this:

mpic++ (...) -Wl,--start-group (list stuff to use when linking)
-Wl,--end-group (...)

 This causes the linker to do multiple passes to satisfy dependencies
so you don't have to get the order right.

 In Solaris, it's:

-Wl,-zrescan-start (...) -Wl,-zrescan-end


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at