How to add compiler include paths and linker library paths for newly installed Boost?

前端 未结 4 957
礼貌的吻别
礼貌的吻别 2020-12-14 08:26

I have RHEL 5.2, with Boost 1.33 installed. I downloaded boost_1_44_0.tar.bz2. and built it. On completion it showed:

The Boost C++ Libraries were successful         


        
4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-14 08:59

    You have to include these directories into makefile which you would use to build your application

    CC -I/home/dfe/Archive/boost_1_44_0 -L/home/dfe/Archive/boost_1_44_0/stage/lib yourprogram.cpp
    

    -I option Adds dir to the list of directories that are searched for #include files.

    -L option adds dir to the list of directories searched for libraries by linker

    CC is sun compiler...

提交回复
热议问题