boost filesystem library files can not be linked

Peng Yu pengyu.ut at gmail.com
Tue Jun 15 21:11:58 UTC 2010


On Tue, Jun 15, 2010 at 3:54 PM, Nils Kassube <kassube at gmx.net> wrote:
> Peng Yu wrote:
>> On Mon, Jun 14, 2010 at 11:31 PM, Nils Kassube <kassube at gmx.net> wrote:
>> > Peng Yu wrote:
>> >> My ubuntu is 10.04. boost was installed from apt-get.
>> >
>> > What exactly did you install? I can't find a package "boost".
>> >
>> >> I compiled the following code. But the library is not available to
>> >> link. I don't find where the library files are. Do I need to
>> >> install some other package in order to get the libraries?
>> >
>> > If you want to compile your own code, you usually need to install
>> > the appropriate -dev packages. I suppose you need libboost-dev in
>> > this case, maybe others as well.
>>
>> I've already installed the boost packages according to the following
>> message. I expect that I don't need to provide -L options as I don't
>> need to provide the -I option to g++. As shown in my previous email,
>> it is due to a link problem. Therefore, it has some problem of
>> finding the library file. I looked at /usr/lib, but I don't find any
>> library libboost*.so. I'm wondering if the libraries are installed
>> somewhere else that I'm not aware of. Would you please check where
>> libboost*.so are installed in your ubuntu system?
>
> I only have very few of those packages installed and these are the
> libboost*.so* files I can find on my system:
>
> ~/ > find /usr/lib -name libboost\*|grep '\.so'
> /usr/lib/libboost_program_options.so.1.40.0
> /usr/lib/libboost_date_time.so.1.40.0
> /usr/lib/libboost_thread.so.1.40.0
>
> As you can see, there are no *.so files, only *.so.* files. And the *.so
> files should be in /usr/lib as well according to apt-file:
>
> ~/ > apt-file search libboost|grep '\.so'|head
> boostpythongenerator: /usr/lib/generatorrunner/libboostpython_generator.so
> boostpythongenerator-dbg: /usr/lib/debug/usr/lib/generatorrunner/libboostpython_generator.so
> libboost-date-time1.40-dev: /usr/lib/libboost_date_time-mt.so
> libboost-date-time1.40-dev: /usr/lib/libboost_date_time.so
> libboost-date-time1.40.0: /usr/lib/libboost_date_time.so.1.40.0
> libboost-filesystem1.40-dev: /usr/lib/libboost_filesystem-mt.so
> libboost-filesystem1.40-dev: /usr/lib/libboost_filesystem.so
> libboost-filesystem1.40.0: /usr/lib/libboost_filesystem.so.1.40.0
> libboost-graph1.40-dev: /usr/lib/libboost_graph-mt.so
> libboost-graph1.40-dev: /usr/lib/libboost_graph.so
>
> That's only an example - there are many more. You can install apt-file
> yourself if you want to see the entire list. Anyway, the *.so files
> should be in the -dev packages.

I remember that I should have run the following command before.

sudo apt-get install libboost*

But only if I run the command, the problem is fixed.

sudo apt-get install libboost-*-dev


Is it because

sudo apt-get install libboost*

do not install the packages installed by the following command?

sudo apt-get install libboost-*-dev


-- 
Regards,
Peng




More information about the ubuntu-users mailing list