[Boost.Test] (Solution) for Visual Studio - Link error, need to be pointed in the right direction
Gennadiy, Once again thanks for the help. Since I could not find anything clear on how to do this myself I thought I would share it with the list and anyone else who does not know how to do this. This process allows me to create a fresh Visual 2005 C++ project and compile the various Boost.Test Unit Testing Framework examples, located under the boost.test documentation branch on the boost website. Assumptions: You have correctly installed and setup Boost (see http://www.boost.org/more/getting_started.html for more information). _Step 1_ File -> New -> Project -> General -> Console (within the wizard choose empty project and console application) _Step 2_ Create a New C++ source code file (*.cpp), add the example code you wish to run _Step 3_ Bring up the properties for the project (Within Solution Explorer right click and select properties on the project) Expand the C/C++ node of the treeview: * Select preprocessor and within the Preprocessor Definitions add the "BOOST_TEST_NO_AUTO_LINK" directive. * Select Code Generation and change the Runtime Library to "Multi-threaded Debug DLL (/MDd)" Expand the Linker node of the treeview: * Select Input and within the Additional Dependencies add "libboost_unit_test_framework-vc80-mt-gd.lib" _Step 4_ Save the project properties. _Step 5_ Compile the code. Notes: 1. The actual Lib file (libboost_unit_test_framework-vc80-mt-gd.lib) may be different for each system? Also I am guessing the Release version to link against will be the lib file without the gd. Also I think the runtime library setting will change to. 2. I have not figured out how to get the output of the tests to appear within the IDE. Currently I do a dodgy and just put a breakpoint within unit_test_main.cpp. Yes I know this is dodgy but I am still learning my way. I hope this helps others interested in using boost and specifically the Unit Test Framework within boost. (I know I would have a week ago :p) Peter.
participants (1)
-
Peter