Problem when using Boost.Asio at Fedora 11
Hi all,
I'm new at C++ and Boost and I'm with some problems when I try to use
Boost.Asio library. I was trying to build the first example from
Boost.Asio's tutorial. The code is like this:
===== CODE =====
#include <iostream>
#include ::context>::~posix_tss_ptr()':
timer.cpp:(.text._ZN5boost4asio6detail13posix_tss_ptrINS1_10call_stackINS1_15task_io_serviceINS1_13epoll_reactorILb0EEEEEE7contextEED2Ev[boost::asio::detail::posix_tss_ptr collect2: ld returned 1 exit status
==== ERROR ==== I already installed Boost and Boost-devel packages. Does anyone know
what is missing ?
Thanks,
--
Davi Vercillo C. Garcia
B.Sc. Student - DCC-IM/UFRJ
Fedora Project Contributor
http://davivercillo.fedorapeople.org/
"If a million people say a foolish thing, it is still a foolish
thing." - Anatole France
On Wednesday 26 August 2009 20:50:02 Davi Vercillo C. Garcia wrote:
I'm trying to compile using this command: g++ -I/usr/include/boost/ example.cpp -o example", and I'm getting this error:
[snip] You need to specify the correct libraries (like so): g++ -pthread -o example example.cc -lboost_system -lboost_date_time Regards, Ravi
Hi,
You need to specify the correct libraries (like so): g++ -pthread -o example example.cc -lboost_system -lboost_date_time
Thanks, it worked !!! One more question, How can I know the correct names of these libraries ? Bye, -- Davi Vercillo C. Garcia B.Sc. Student - DCC-IM/UFRJ Fedora Project Contributor http://davivercillo.fedorapeople.org/ "If a million people say a foolish thing, it is still a foolish thing." - Anatole France
Hi,
Simply look in corresponding lib folder and filter all libboost... files. Once you will meet similar errors in future, you will be able to determine what library you need to link.
Ok ! Thanks, -- Davi Vercillo C. Garcia B.Sc. Student - DCC-IM/UFRJ Fedora Project Contributor http://davivercillo.fedorapeople.org/ "If a million people say a foolish thing, it is still a foolish thing." - Anatole France
participants (3)
-
Davi Vercillo C. Garcia
-
Ravi
-
Roman Shmelev