开发者

how do I point my compiler and linker in Eclipse and Windows?

开发者 https://www.devze.com 2023-01-31 21:20 出处:网络
I downloaded boost. The instructions at the website said this: In this example, you would point your linker at C:\\lib\\boost\\lib and tell your compiler to search for includes in C:\\lib\\boost and

I downloaded boost. The instructions at the website said this:

In this example, you would point your linker at C:\lib\boost\lib and tell your compiler to search for includes in C:\lib\boost and include them using the second boost directory, for example #include "boost/filesystem.h开发者_StackOverflow社区pp

How exactly do I point my linker and compiler?

I'm working in Eclipse on Windows 7.


Compiler: To add include directory, add boost path in:

project properties->C\C++ Build->Settings->Directories->GCC C++ Compiler->Directories

Note: add the folder in which the folder "boost" resides, so you can do

#include "boost/smart_ptr.hpp"

Linker: To add libraries path, add a search path (pointing to where all lib files are) in:

project properties->C\C++ Build->Settings->Directories->MinGW C++ Linker->Libraries

(This assumes you're using the MinGW toolchain. Should be the same on other toolchains).

Cheers

0

精彩评论

暂无评论...
验证码 换一张
取 消