Previous
Configuring the Project to use Boost
- Edit your project’s properties (right-click, properties)
- SelectC/C++ Build:Settings
- UnderGCC C++ Compiler:Includes enter the include directory for boost.
- Click the page with the green plus.
- SelectFile system…
- Enter or search to the directory. For my install location, the directory is: C:\workspaces\boost_1_43_0.
- UnderMinGW C++ Linker:Libraries, enter both a library path as well as a library (for this example, we’ll use boost date_time).
- UnderLibraries (-l), click on the page with a green plus
- Enter the name of the library (minus “lib” and “.lib”):boost_date_time-mgw44-mt-1_43
- UnderLibrary search path (-L), click on the page with a green plus
- Enter the directory where the library is located. On my machine it isC:\workspaces\boost_1_43_0\stage\lib
- Click OK
- Verify these settings.
- Create a new file: BoostDateTimeSmokeTest.cpp:
- Important: The CppUTest header files need to be includedlast.
- Build and run your tests. You’re really just checking that you can compile and link.
Previous
Comments