How to add boost library to Code::Blocks in Linux

后端 未结 2 940
一向
一向 2021-01-03 10:35

How to add the boost library to a Code::Blocks project in Linux Ubuntu? For example I want to add regex lib.

I\'ve already installed the boost library w

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-03 11:02

    Two steps to finish:

    1. Include the header files. If you set everything as default, the headers will be installed at

    /usr/include/boost

    . 2. Select the links you're going to use during compiling. It's default location is

    /usr/lib

    ATTENTION: It seems to me that the

    -lboost_system

    is always needed. So be careful if you need -lboost_filesystem or some libs else.

提交回复
热议问题