I has been trying to get boost into Eclipse. I googled some posts and it seems I need to build the binaries from source files. One step I need to take is to enter the boost/tools/jam directory to build the bjam tool, but I didn't see the jam/ directory under tools/. I downloaded the latest version of boost.
Boost's custom build system works just fine from the command line, building from the IDE is kindof pointless. Just look up the settings you need for Boost Jam for your specific compiler.
There are also prebuilt boost binaries available for download on the internet, what do you need to build from source?
Now I am able to build the binaries, and all boost libraries are automatically under boost/stage/lib. But I still got a undefined reference problem when i tried to test the boost_filesystem library.
There are two libraries built for filesystem under stage/lib:
libboost_filesystem-mgw46-mt-1_47.a
libboost_filesystem-mgw46-mt-d-1_47.a
I added "boost_filesystem-mgw46-mt-1_47" to the libraries in "MinGW C++ linker", but still got an undefined reference problem. Any idears?
I got this message:
**** Build of configuration Debug for project Hello ****
**** Internal Builder is used for build ****
g++ -IC:\boost_1_47_0 -O0 -g3 -Wall -c -fmessage-length=0 -osrc\hello.o ..\src\hello.cpp
g++ -LC:\boost_1_47_0\stage\lib -oHello.exe src\hello.o -lboost_filesystem-mgw46-mt-1_47 -lboost_thread-mgw46-mt-1_47 -lboost_date_time-mgw46-mt-1_47
src\hello.o: In function `_static_initialization_and_destruction_0':
C:/boost_1_47_0/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
C:/boost_1_47_0/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
C:/boost_1_47_0/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
C:\boost_1_47_0\stage\lib/libboost_filesystem-mgw46-mt-1_47.a(operations.o):operations.cpp:(.text+0x65): undefined reference to `boost::system::system_category()'
C:\boost_1_47_0\stage\lib/libboost_filesystem-mgw46-mt-1_47.a(operations.o):operations.cpp:(.text+0xb3): undefined reference to `boost::system::system_category()'
C:\boost_1_47_0\stage\lib/libboost_filesystem-mgw46-mt-1_47.a(operations.o):operations.cpp:(.text+0x3b4): undefined reference to `boost::system::system_category()'
C:\boost_1_47_0\stage\lib/libboost_filesystem-mgw46-mt-1_47.a(operations.o):operations.cpp:(.text+0x427): undefined reference to `boost::system::system_category()'
C:\boost_1_47_0\stage\lib/libboost_filesystem-mgw46-mt-1_47.a(operations.o):operations.cpp:(.text+0x52c): more undefined references to `boost::system::system_category()' follow
C:\boost_1_47_0\stage\lib/libboost_filesystem-mgw46-mt-1_47.a(operations.o):operations.cpp:(.text+0x3755): undefined reference to `boost::system::generic_category()'
C:\boost_1_47_0\stage\lib/libboost_filesystem-mgw46-mt-1_47.a(operations.o):operations.cpp:(.text+0x377c): undefined reference to `boost::system::system_category()'
C:\boost_1_47_0\stage\lib/libboost_filesystem-mgw46-mt-1_47.a(operations.o):operations.cpp:(.text+0x3795): undefined reference to `boost::system::system_category()'
C:\boost_1_47_0\stage\lib/libboost_filesystem-mgw46-mt-1_47.a(operations.o):operations.cpp:(.text+0x37d9): undefined reference to `boost::system::generic_category()'
C:\boost_1_47_0\stage\lib/libboost_filesystem-mgw46-mt-1_47.a(operations.o):operations.cpp:(.text+0x38c2): undefined reference to `boost::system::system_category()'
C:\boost_1_47_0\stage\lib/libboost_filesystem-mgw46-mt-1_47.a(operations.o):operations.cpp:(.text+0x39ed): undefined reference to `boost::system::generic_category()'
C:\boost_1_47_0\stage\lib/libboost_filesystem-mgw46-mt-1_47.a(operations.o):operations.cpp:(.text+0x3a13): undefined reference to `boost::system::generic_category()'
C:\boost_1_47_0\stage\lib/libboost_filesystem-mgw46-mt-1_47.a(operations.o):operations.cpp:(.text+0x3b08): undefined reference to `boost::system::system_category()'
C:\boost_1_47_0\stage\lib/libboost_filesystem-mgw46-mt-1_47.a(operations.o):operations.cpp:(.text+0x3b30): undefined reference to `boost::system::system_category()'
C:\boost_1_47_0\stage\lib/libboost_filesystem-mgw46-mt-1_47.a(operations.o):operations.cpp:(.text+0x3b72): undefined reference to `boost::system::system_category()'
C:\boost_1_47_0\stage\lib/libboost_filesystem-mgw46-mt-1_47.a(operations.o):operations.cpp:(.text+0x3d22): undefined reference to `boost::system::system_category()'
C:\boost_1_47_0\stage\lib/libboost_filesystem-mgw46-mt-1_47.a(operations.o):operations.cpp:(.text+0x3e5d): undefined reference to `boost::system::system_category()'
C:\boost_1_47_0\stage\lib/libboost_filesystem-mgw46-mt-1_47.a(operations.o):operations.cpp:(.text+0x4ad2): more undefined references to `boost::system::system_category()' follow
collect2: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 1128 ms.