TimX
TimX

Reputation: 25

Build error when linking Boost for Quantlib

I'm trying to do a first build of Quantlib, but I'm getting the fatal error "LNK1104: cannot open file 'libboost_unit_test_framework-vc120-mt-gd-1_56.lib'". There's a reasonable amount of discussion on this in the forum but nothing has helped me yet.

I'm using Visual Studio 2013 on a Win 8.1 box.

I built Boost by: b2 --build-dir="C:\Program Files\Boost\boost_1_56_0\boostBuild" --build-type=complete msvc stage . The demonstration Boost regex program works fine.

Then I opened the Quantlib_vc11 solution and added the Linker Additional Library Directories as described on the Quantlib installation page. But the build fails with the error message above.

I'm new to C++ and to Visual Studio, and I'm sure it's my lack of understanding that is giving me this problem, but if someone can give me some pointers it would be great. Thanks

Upvotes: 0

Views: 1019

Answers (2)

nietzschetmh
nietzschetmh

Reputation: 69

I have the same problem before but I used vs2012. Hope my experience can help.

In my case, I opened property manager(View->Other Windows->Property Manger), dropped down to

QuantLib->Debug(static runtime) |Win32 ->Microsoft.Cpp.Win32.user.

Right click 'property' and go to VC++ Directories, then on the right hand side, open Library Directories and add your boost address ".../boost_1_xx/stage/lib" here.

'libboost_unit_test_framework-vc120-mt-gd-1_56.lib' is used for project "testsuite".

Upvotes: 0

SmallChess
SmallChess

Reputation: 8156

Can you please check if the file is really in the directory you give to VS? The error means VS couldn't find the file, not because the file is corrupted or built incorrectly.

Furthermore, if you're uninterested to build the boost library yourself, you can simply download those *.lib files online. You don't have to run the boost build commands. There're lots of sites offering you those library files.

Upvotes: 0

Related Questions