You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

新手求助:在CodeLite中配置使用已安装的Boost库

Hey there! Glad to hear you’ve successfully installed Boost to /usr/local/boost_1_67_0 and got the sample program running. Now let’s get it set up in CodeLite so you can start using Boost in your own projects smoothly. Here’s how to do it:

Configuring Boost in CodeLite

Option 1: Global Configuration (Applies to All Projects)

If you want every CodeLite project to have access to Boost, set this up once:

  • Open CodeLite, go to the top menu bar and click Settings > Compiler
  • Select your active compiler (like GCC) from the left sidebar
  • Switch to the Include Paths tab, click Add, paste /usr/local/boost_1_67_0, then save
  • Next, go to the Libraries Paths tab, add /usr/local/boost_1_67_0/stage/lib (this is where your compiled Boost libraries live after the full install)
  • If you need to link specific Boost libraries (e.g., boost_filesystem, boost_thread), head to the Linker tab, add the library names to the Libraries list (omit the lib prefix and .so suffix, so just boost_filesystem for libboost_filesystem.so)

Option 2: Project-Specific Configuration (Only for One Project)

If you only want Boost available for a single project:

  • Right-click your project in the workspace panel, select Settings
  • Under Compiler > Include Paths, add /usr/local/boost_1_67_0
  • Under Linker > Libraries Paths, add /usr/local/boost_1_67_0/stage/lib
  • Under Linker > Libraries, add the specific Boost libraries you plan to use

Test Your Setup

To make sure everything’s working, create a quick test code:

#include <iostream>
#include <boost/version.hpp>

int main() {
    std::cout << "Boost Version: " << BOOST_VERSION << "\n";
    return 0;
}

Compile and run it—if it outputs 106700 (the version code for 1.67.0), you’re all set!

Quick reminder: The message you got after running ./bootstrap.sh is exactly pointing out the paths we’ve added above, so you’re following the official guidance perfectly.

内容的提问来源于stack exchange,提问作者infinitezero

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 09:19:57