Thanks for reply Brett. I am not not using make file i am letting eclipse to handle this.
paths are already added in project -> properties-> C/c++ general -> paths & symbols-> library paths. i added "C:\boost_1_38_0\libs" path where my boost library is located. While running in console it shows "g++ -LC:\boost_1_38_0\libs -osock1.exe src\sock1.o" ..... What else can be the error? Please suggest.... Brett McCoy-2 wrote: > > On Mon, May 11, 2009 at 1:25 PM, [email protected] <[email protected]> > wrote: >> >> Hi, >> I am running a simple socket example of boost.asio library. i am getting >> the >> following error. can any one help me in this regard. >> >> here is the example code: >> http://www.boost.org/doc/libs/1_38_0/doc/html/boost_asio/tutorial/tutdaytime1/src.html >> >> I am buinding it in eclipse and mingw. >> >> Description Resource Path Location Type >> C:/boost_1_38_0/boost/system/error_code.hpp undefined reference to >> `boost::system::get_generic_category()' sock1 206 C/C++ >> Problem > > I would venture to guess you aren't linking against the correct boost > library. Are you using an external makefile that Eclipse runs or are > you letting Eclipse handle the dependencies? If you are using a > makefile, you need to make sure you have the boost libraries in your > linker search path (gcc uses -L for this) and also make sure you have > the correct boost library listed with the linker (gcc uses -l for > this). > > Something like > > gcc -o <target_executable> -L/path/to/boost -lboost > > If you are letting Eclipse handle the library dependencies, you need > to open the Properties for your project and add the pathes and > libraries under 'C/C++ Project Paths' so Eclipse knows where to find > the libraries. > > -- Brett > ------------------------------------------------------------ > "In the rhythm of music a secret is hidden; > If I were to divulge it, it would overturn the world." > -- Jelaleddin Rumi > > -- View this message in context: http://www.nabble.com/Can-any-one-help-me-in-sockets-prog-using-boost.asio-tp23487826p23502356.html Sent from the C-prog mailing list archive at Nabble.com.
