From: Rene Perlberg (Perle5000_at_[hidden])
Date: 2008-03-26 09:51:42
I'm trying to implement a logger into my project. This logger is precompiled as a shared library itself and furthermore uses a pthread shared library, also precompiled.
I'm trying to implement the logger in my Jamfiles as follows:
: requirements <include>include <variant>debug:<define>NAT_DEBUG
: build-dir bin/
use-project /loglibrary : ../3rd_party_libs/libraries/loglib ;
: usage-requirements <include>../include
: [ glob *.cpp ] /loglibrary//libloglib
: # already exists, therefore no sources
: pthread #marks dependency to pthread
: <target-os>linux:<name>loglib <search>linux/
Under linux, build is fine. Under windows, using msvc build also is fine. Problem is, when trying to compile with mingw gcc under windows I always get the following error message:
bjam gcc release cxxflags=-Wall
...found 72 targets...
...updating 2 targets...
Creating library file: ..\bin\src\gcc-mingw-3.4.5\release\libnatlib.lib
..\bin\src\gcc-mingw-3.4.5\release\ConnCommon.o:ConnCommon.cpp:(.text+0x30e): undefined reference to `_imp__pthread_self'
collect2: ld returned 1 exit status
After trying some things, it seems to me, that using the rules <name> and <search> instead of <file> no error happens. But this leads to other problems, due to the fact that I don't really know how to write this at the moment. Anyway, I would like to know how this error can be avoided.
Thanks in advance,
-- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
Boost-Build 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