Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How boost auto-linking makes choice?

When I use Visual Studio 2012, with auto-linking, I don't need to add boost / POCO/ python libraries manually, they would be added automatically. And if I miss any library, I get message like that:

LINK : fatal error LNK1104: cannot open file 'libboost_system-vc110-mt-1_55.lib'

But how it knows which file I want to link? Maybe I want to link dynamically, using boost_system-vs110-mt-1_55.lib, or I want one with gd or sgd in name?

How it makes choice?

Problem is, that my program is looking for libboost_ ... (i.e. static) libraries, when search for system, threads and etc, but it wants boost_ (i.e. dynamic) for python, and I just don't understand why?

like image 531
Arkady Avatar asked Apr 02 '14 08:04

Arkady


1 Answers

Visual Studio allows #pragma directives in the source code to set linker options. For "auto-linking", Boost uses these #pragma's in combination with existing macro's.

In particular, it sounds like you are looking for the BOOST_ALL_DYN_LINK macro.

like image 78
MSalters Avatar answered Sep 28 '22 02:09

MSalters