Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost::thread] can not link on open suse
From: Olaf Meeuwissen (olaf.meeuwissen_at_[hidden])
Date: 2011-12-11 18:22:04


Kaz <sfx810_at_[hidden]> writes:

> when I try to compile it using this command
> g++ -static -I./Built_Boost_1.4.8.0/include
> -L./Built_Boost_1.4.8.0/lib/ boostThreadTest.cpp -lboost_thread
> -lpthread -o threadTest
> I get following error
>
> /usr/lib/gcc/i586-suse-linux/4.6/../../../../i586-suse-linux/bin/ld:
> cannot find -lpthread
> /usr/lib/gcc/i586-suse-linux/4.6/../../../../i586-suse-linux/bin/ld:
> cannot find -lm
> /usr/lib/gcc/i586-suse-linux/4.6/../../../../i586-suse-linux/bin/ld:
> cannot find -lc
> collect2: ld returned 1 exit status

Odd though it may seem, looks like you haven't installed libc6-dev.

Hope this helps,

-- 
Olaf Meeuwissen, LPIC-2           FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962               Help support software freedom
                 http://www.fsf.org/jf?referrer=1962

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