Boost logo

Threads-Devel :

From: Anthony Williams (anthony_at_[hidden])
Date: 2008-02-15 03:37:13


Quoting Florian <robotik_at_[hidden]>:

> I read this message and thought it might related to my problem.
> Something is missing when my main.cpp is not compiled along with the
> Boost-thread code of tss.cpp:

> I built two versions, one including boost\libs\thread\src\tss.cpp and
> one without. Both linking to
>
> boost\bin.v2\libs\thread\build\qcc\release\link-static\threading-multi\l
> ibboost_thread-mt-1_34_1.a
>
> and QNX 6.3's
> libcxa.a
> libcpp.a
>
> The QNX versions of this Boost library was build using the bjam call:
>
> bjam -a --without-python --toolset=qcc release threading=multi
> link=static
>
>
> When I execute the binary without tss.cpp it crashes at runtime; the
> other doesn't:
>
> # ./BoostThreadExample
> Memory fault (core dumped)
>
> # ./BoostThreadExample_working
> setting alarm for 5 seconds...
> alarm sounded...
>
>
> What were I doing wrong and where? My windows target of the same code
> with MinGW there are no such problems.
> Am I missing a static library from QNX? I tried to switch to libstdc++.a
> but had no success.

I don't know anything about QNX. But this really shouldn't happen ---
there should be no need to explicitly add the boost.thread source
files to your project, that's the whole point of building them as a
library! It makes me think that the library/application build settings
are incompatible some how.

Have you tried using bjam to build your app, thus ensuring the same
build settings?

Anthony

-- 
Anthony Williams            | Just Software Solutions Ltd
Custom Software Development | http://www.justsoftwaresolutions.co.uk
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

Threads-Devel list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk