Adding Boost Library to a C++ project in OS X Eclipse

前端 未结 5 633
無奈伤痛
無奈伤痛 2021-02-06 02:41

I am have been attempting to get a C++ project setup using boost file system library using eclipse. I followed these directions to install boost on my system. The directions whe

5条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-06 03:11

    Not sure where you do this in Eclipse these days, but under the include paths for Eclipse should be the path to the main boost directory (/Users/jacobschoen/Library/boost_1_45_0?). The compiler line should have something like the following in it, I would think:

    Invoking: GCC C++ Compiler

    g++ -I/Users/jacobschoen/Library/boost_1_45_0 -O0 -g3 -Wall -c -fmessage-length=0 -MMD (etc..)

    Update: Looking at my system, the linker path on yours might be more appropriately:

    -I/Users/jacobschoen/Library/boost_1_45_0/stage/lib

    Depending, of course, upon how you've installed and built boost -- this is with my most recent attempt with a full source build. Depending upon how you obtained boost, this may or may not be different. I recently redid the boost on my Mac for 64 bit and haven't had much time to try it yet....

提交回复
热议问题