Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Boost unit test link error [closed]

I just started using 'boost test' for C++ unit tests in a Windows environment (Visual Studio 2010). I'm following this tutorial as a guide:

http://legalizeadulthood.wordpress.com/2009/07/04/c-unit-tests-with-boost-test-part-1/ But after including the boost unit_test.hpp file, it shows the compile error below:

LINK : fatal error LNK1104: cannot open file 'libboost_unit_test_framework-vc100-mt-gd-1_52.lib'

My source code is like this:

#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>

Please assist with ideas on how to solve this.

like image 202
Nayana Adassuriya Avatar asked Jul 15 '26 19:07

Nayana Adassuriya


1 Answers

I solved this issue by two steps.

  1. build boost by using command prompt. instructions check here
  2. Add "boost_1_52_0\stage\lib" to project propert->Linker->Library path
like image 193
Nayana Adassuriya Avatar answered Jul 18 '26 08:07

Nayana Adassuriya



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!