1. 程式人生 > >thrift 編譯調用boost動態庫

thrift 編譯調用boost動態庫

thrift

In the project properties you must also set HAVE_CONFIG_H

as force include the config header: "windows/confg.h"



By default lib/cpp/windows/force_inc.h defines:

#define BOOST_ALL_NO_LIB 1

#define BOOST_THREAD_NO_LIB 1



This has for effect to have the host application linking against Thrift to have to link with boost thread as a static library. If you wanted instead to link with boost thread

as a shared library,you‘ll need to uncomment those two lines, and recompile.



調用boost的動態庫,需要註釋掉上面的兩行代碼,但是在目前來看依舊出現依賴

libboost_thread-vc140-mt-sgd-1_64.lib

不過從這裏其實已經可以看出,調用的確實是靜態庫,其中有s,gd代表的意思是調試,mt代表多線程,

因此鏈接到boost靜態庫,說明運行時庫指定的不正確,應該指定MDT

詳細的資料參考如下;

http://www.cnblogs.com/bluedoctor/p/6236905.html

http://blog.csdn.net/xucuiping_/article/details/5979532


目前采用的boost庫是動態編譯出來的,因此必須指定正確的運行時庫,否則就會編譯出錯

thrift 編譯調用boost動態庫