Boost logo

Boost Users :

Subject: Re: [Boost-users] boost filesystem library files can not be linked
From: Mostafa (mostafa_working_away_at_[hidden])
Date: 2010-06-14 19:11:28


On Mon, 14 Jun 2010 15:56:26 -0700, Peng Yu <pengyu.ut_at_[hidden]> wrote:

>> In addition to the boost_filesystem lib, you also need to link against
>> the
>> boost_system lib. I believe this should solve your problem.
>
> If I use g++, I should compile it like this, right?
>
> g++ -o main.exe main.cpp -lboost_filesystem -lboost_system
>

You may also need to specify the -L option if your boost libs are not in
the linkers default search path. Something like this:

g++ -o main.exe main.cpp -L<directory containing "libboost_filesystem*">
-lboost_filesystem -lboost_system


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