user997112
user997112

Reputation: 30605

Installing boost 1.52 with VS2012

I followed these instructions to install boost and to compile all libraries:

https://www.quantnet.com/threads/tutorial-quantlib-boost-installation-in-visual-studio-2012.11891/

Boost Installation The Boost library can be downloaded here. Currently, the latest version available is Boost 1.52.0. You can build boost by following the instruction here.

Alternative you can download a pre-built lib from here. Once downloaded, copy the installer into the Boost 1.52.0 folder and run it. Rename the folder to lib once done.

So I downloaded boost 1.52, then copied that to C:\Program Files (x86)\boost\

I then downloaded the 1.52 64 bit installer and once downloaded, pasted that to:

C:\Program Files (x86)\boost\boost_1_52_0\boost_1_52_0\

I executed the installer- it said "extracting" and then many library names.

I then renamed the last folder to lib, so that I had:

C:\Program Files (x86)\boost\boost_1_52_0\lib\

In my VS2012 I then added the previous directory to my project. The project then starting parsing through the libraries and I had no linker errors. However, when building the project I still got:

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

(The only usage of boost in my project is file_mapping and mapped_region)

Help?

EDIT: I am aware about some libraries needing to be compiled separately in boost. I thought the above was to achieve this? If not, could someone please advise how because this really becomes a pain.

Upvotes: 1

Views: 459

Answers (1)

Nick Louloudakis
Nick Louloudakis

Reputation: 6005

Boost has some libraries (most of them) used as source headers (.h files) that do not need to be pre-compiled, but there are also some libraries that need to be pre-compiled (.lib files). You can either download the libraries pre-compiled from the Boost website (http://www.boostpro.com/download/), although you might get some older versions from there, or compile them (the latest version or any of those available you want) on your own, although please have in mind that this might take some time, depending on your computer specs. See here for more: http://www.boost.org/doc/libs/1_54_0/libs/regex/doc/html/boost_regex/install.html.

After downloading the "normal" boost package, put the folders/files extracted on a folder and then assocciate it in VS2012 by putting the folder path in

(YourProject > Right-Click > Preferences >)General > VC++ Directories > Include Directories.

Then download and install the pre-compiled libraries (extract them on a folder) and then associate this folder with the VS, in

(YourProject > Right-Click > Preferences >) Linker > General > Additional Library Directories.

Of course, as mentioned before, you can also compile the packages you want, and then associate them with Visual Studio the same way.

Upvotes: 1

Related Questions