Boost logo

Boost Users :

From: John Maddock (john_maddock_at_[hidden])
Date: 2002-03-28 07:23:00


> In Solaris, the order of the libraries and objects, in link time, _does_
matter.
> So, instead of:
> -lboost_thread -lpthread -lposix4 main.o
> you have to put
> main.o -lboost_thread -lpthread -lposix4
>
> That way, it works.

Don't forget that you *must* also compile with -pthreads and link
with -pthreads, without this you won't have a thread safe std lib, and
probably other problems as well (see gcc -dumpspecs for a full list of
what -pthreads does on Solaris). The issue we're grappling with is that
when you specify -pthreads in debug mode you will get an unresolved external
from std::runtime_error::runtime_error, the fix is to place:

#pragma implementation "stdexcept"

in one of your source files (this isn't needed for release code though). We
should probably get this fix rolled into the thread lib itself at some
stage.

John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/index.htm


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net