- www.boost.org:下載下傳需要的boost版本庫
- 進入boost的根路徑
- 這裡使用vs2015,使用“”VS2015 x64 本機工具指令提示符“ 這裡要進行編譯必須使用這個
- 進入項目根路徑,運作 bootstrap.bat ,會生成b2.exe
- b2 stage --toolset=msvc-14.0 --with-system --with-date_time --with-regex --with-thread --with-serialization threading=multi link=static runtime-link=shared address-model=64 --stagedir="G:\YOUJIALI\long_youcaly_analysis\boostrap\boostrap\lib"
- 其中msvc是編譯器的版本,這個和vs的版本有關系
- --with+需要的庫 ,這裡指定要運作的庫
- link:(static 或者 shared)這裡指明要生成庫的類型是靜态庫還是動态庫
- runtime-link:(static或者shared) 這裡指明在運作時庫的使用是靜态連結還是動态連結
- --stagedir:指明生成的lib庫放置的位置
- --build-type=complete 有時添加這個參數,生成debug和release版本,不加也可以
- 這裡生成的debug和release要和VS運作庫向對應,debug模式,使用debug;不然會出現檢測出現問題
- 參考文章:
- https://blog.csdn.net/tl070602023/article/details/52051939
- https://www.cnblogs.com/ypdxcn/p/9857830.html