Boost logo

Boost Users :

Subject: Re: [Boost-users] [thread] - install - libraries not referencing?
From: Mika Heiskanen (mika.heiskanen_at_[hidden])
Date: 2011-12-07 13:04:38


On Wed, 2011-12-07 at 19:39 +0200, floobit wrote:

> using
> g++ boosttest1.c -o boosttest1
>
>
> the compiler throws errors to each reference of a boost function (I
> have removed the names of temp files referenced by the compiler):
> undefined reference to `boost::this_thread::yield()'
> undefined reference to `boost::thread::~thread()'

Try

  g++ boosttest1.c -o boosttest1 -lboost_thread

If you get more undefined references, try appending
-lboost_system and/or -lpthread.

Mika Heiskanen


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