LNK1104: cannot open file 'libboost_unit_test_framework-vc90-mt-gd-1_47.lib'

Hello, I am a newbie in the world of testing and using boost. I went through some of the previous discussion on this topic with no luck at trouble shooting my current issue. I am using visual c+ 2008 express edition, I tried installing boost using boostpro . I right click on project, and under c++ -> general -> additional dir; have added the following path. C:\Program Files (x86)\boost\boost_1_47 Now, when I try to run boost example I get the following error , No matter what I do I just cannot get rid of this error any help is greatly appreciated . 1>------ Build started: Project: UnitTestPrac1, Configuration: Debug Win32 ----- - 1>Linking... 1>LINK : fatal error LNK1104: cannot open file 'libboost_unit_test_framework- vc90-mt-gd-1_47.lib' 1>Build log was saved at "file://c:\Users\amaster\Desktop\AVM_Documents\CppPractise\UnitTestPrac1\UnitTes tPrac1\Debug\BuildLog.htm" 1>UnitTestPrac1 - 1 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== // Following is my example #define BOOST_TEST_MODULE MyTest #include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_CASE(MyTestCase) { // To simplify this example test, let's suppose we'll test 'float'. // Some test are stupid, but all should pass. float x = 9.5f; BOOST_CHECK(x != 0.0f); BOOST_CHECK_EQUAL((int)x, 9); BOOST_CHECK_CLOSE(x, 9.5f, 0.0001f); // Checks differ no more then 0.0001% } Thank you in advance. Sincerely, --
From the withered tree, a flower blooms. - Zen

On Mon, Dec 19, 2011 at 10:30 AM, ankit master <ankit.master@gmail.com>wrote: [...]
1>------ Build started: Project: UnitTestPrac1, Configuration: Debug Win32 ----- - 1>Linking... 1>LINK : fatal error LNK1104: cannot open file 'libboost_unit_test_framework- vc90-mt-gd-1_47.lib' 1>Build log was saved at
"file://c:\Users\amaster\Desktop\AVM_Documents\CppPractise\UnitTestPrac1\UnitTes tPrac1\Debug\BuildLog.htm" 1>UnitTestPrac1 - 1 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
[...] In addition to adding the boost root directory to your C++ include path, you also need to add it to your linker path (and, based on the above, it *looks* like you haven't). See if adding the appropriate boost directory where the libs reside to the linker path helps. Also check to ensure that the above static library is actually in said path. Otherwise, I'm pretty bad at diagnosing linking problems :/ HTH, - Jeff
participants (2)
-
ankit master
-
Jeffrey Lee Hellrung, Jr.