Boost logo

Boost Users :

Subject: Re: [Boost-users] Fwd: Getting ASIO application to link (undefined reference to `boost::system::generic_category()) (SOLVED)
From: Slava (Viatcheslav.Sysoltsev_at_[hidden])
Date: 2013-09-18 02:32:11


On Tue, 17 Sep 2013 19:20:54 +0200, Ulf Samuelsson <boost-user_at_[hidden]>
wrote:

> Solved!
> The Libraries need to be at the end during the link phase.
>
> $ g++ -c -I/usr/include -Iinclude -std=c++0x -o udp_echo_client.o
> udp_echo_client.cpp
> $ g++ -o udp_echo_client udp_echo_client.o -L/usr/lib -lboost_filesystem
> -lboost_system -lpthread
>
> works
>
> BR
> Ulf
>

... what means that the linker uses static libraries (.a).
Use -t linker flag (-Wl,-t to gcc) to debug which libraries linker finds
and which it takes.
// The *.so are in -dev packages in some distributions. Maybe you need
boost*dev package(s) installed in ubuntu?

Regards, Slava


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