Boost logo

Boost Users :

Subject: [Boost-users] Link error using thread library
From: Phillip Jones (pjones13_at_[hidden])
Date: 2008-10-27 09:48:41

I'm trying to compile an inherited program, and a not so well
documented one at that.

Anyway, using CodeBlocks and MinGW on a Windows system, and I'm stuck
on this error:

..\obj\Debug\src\GameVisualizer.o||In function `WinMain':|
src\GameVisualizer.cpp|39|undefined reference to
..\obj\Debug\src\GameVisualizer.o||In function `GLOBAL__D_io_mutex1':|
src\GameVisualizer.cpp|51|undefined reference to
std::allocator<boost::function_base> > const&)'|
src\GameVisualizer.cpp|51|undefined reference to
..\obj\Debug\src\GameVisualizer.o||In function `ZN6PlayerC1Ev':|
)]+0xd)||undefined reference to `boost::mutex::do_unlock()'|
)]+0xd)||undefined reference to `boost::mutex::do_lock()'|

(it keeps going)

I assume this is a linking problem. Here's what I've done so far, I'm
hoping an outside pair of eyes can see what I'm missing. Used bjam to
compile the thread libraries.

bjam --build-dir "D:\bin.v2" --with-thread --toolset=gcc
--build-type=complete stage

Then, added "boost_thread-mgw34-mt-d-1_36" to the link libraries.
Verified that the linker can find the library. Yet, still getting
these errors. Any pointers would be much appreciated.

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