including the -I/path/to/boost seemed to do the trick, however, once I started utilizing it (asio/date_time) I started getting things such as
undefined reference to `pthread_detach'

Code directly taken from the tutorial here:
http://asio.sourceforge.net/boost_asio_0_3_7/libs/asio/doc/tutorial/tuttimer1src.html

Is there a list of the exact library names in boost/asio?

On Nov 29, 2007 11:27 AM, <jayc.lawrence@gmail.com> wrote:
Hi Daniel,

Where were your boost header files and libraries compiled to? I had
similar issues and John Maddock helped me solve a path issue. Try adding

-I/path/to/boost

to your compile string e.g

g++ -v -s -I/path/to/boost myfile.cpp -o myfile.exe

you might need to add the relevant -lboost_library_name_goes_here to the
end of that compile string, where boost_library_name_goes_here is the
name of the library you are using.

I thought this would be easier on linux than windows to be honest and
here you are having some problems !

Hope this helps.

Jay

Daniel wrote:
> I wrote a simple "Hello, world!" program to test if boost/asio was
> working correctly:
>
> #include <iostream>
> #include <boost/date_time/posix_time/posix_time.hpp>
>
> int main()
> {
>   std::cout << "Hello, world!\n";
>   return 0;
> }
>
> But, I get this: (GCC C++ 4.1.2/Linux version 2.6.22-gentoo-r8)
> test.cpp:(.text+0x10b): undefined reference to
> `boost::system::get_system_category()'
> test.cpp:(.text+0x115): undefined reference to
> `boost::system::get_posix_category()'
> test.cpp:(.text+0x11f): undefined reference to
> `boost::system::get_posix_category()'
> test.cpp:(.text+0x129): undefined reference to
> `boost::system::get_system_category()'
>
>
> This happens when I used '#include
> <boost/date_time/posix_time/posix_time.hpp>'
> I can't figure out what I'm missing
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Boost-users mailing list
> Boost-users@lists.boost.org
> http://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users