【问题标题】:CodeLite not working with boost libraryCodeLite 不适用于 boost 库
【发布时间】:2015-01-18 13:57:32
【问题描述】:

我在让我的 CodeLite IDE 与 Boost 库一起工作时遇到了一些麻烦。

所以基本上,我已经从 sourceforge 下载了 CodeLite v.6.1.1 和 Boost 库。我很想让它真正工作,但我没有使用以下概念来做到这一点:

我确实创建了新的工作区,而不是去 -> Settings -> Build Settings -> Compilers(这里我有两个编译器,其中一个是CodeLite 4.8.1,另一个是MinGW Code::Blocks,我确实选择了CodeLite 4.8.1. -> Advanced -> Global Paths -> 我确实提供了两个空白行 Include Path 和 Libraries Path 以及解压后的 boost 库(Windows 7)的目录:C:\boostlib\boost_1_57_0。

在这个目录(即:C:\boostlib\boost_1_57_0)中,我得到了所有必需的文件,所有这些文件都已解压缩,但我无法让它工作。

此外,当我完成设置包含 boost 库的文件的路径后,我无法单击应用,我所能做的就是单击确定,但一旦完成,我就无法使用 boost 中的库.

以下代码不起作用:

#include <boost/lambda/lambda.hpp>
#include <iostream>
#include <iterator>
#include <algorithm>

int main()
{

   using namespace boost::lambda;  
   // ERROR MESSAGE: boost/lambda/lambda.hpp, No such file or directory
   typedef std::istream_iterator in;
   std::for_each(in(std::cin), in(), std::cout << (_1 * 3) << ” ” );
   return 0;

}

我得到的信息是:

boost/lambda/lambda.hpp:没有这样的文件或目录

我有没有机会让 CodeLite 与 boost 库一起工作,或者我应该简单地切换 IDE 并忘记它?

【问题讨论】:

    标签: c++ boost codelite


    【解决方案1】:

    您在正确的轨道上,但需要指向库并在 boost 目录中包含文件夹。

    我使用 http://nuwen.net/mingw.html 版本的 mingw,因为 STL(这个家伙)在他的发行版中包含了 boost。

    所以在 codeLite 中我只需要添加 C:\MinGW\lib 到库路径 C:\MinGW\include 到包含路径

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-11-12
      • 1970-01-01
      • 1970-01-01
      • 2013-12-30
      • 1970-01-01
      • 1970-01-01
      • 2020-10-03
      • 2018-07-21
      相关资源
      最近更新 更多