【发布时间】:2009-02-26 10:23:54
【问题描述】:
对于比我更高级的用户来说,这应该是一个简单的问题。 :-) 如何在 windows 上使用带有 cygwin 的 boost 库?
我正在使用 cygwin 在 winxp 机器上使用 g++ 进行编程。 我需要修改二阶贝塞尔函数,所以我下载了最新版本的boost库并安装在 'c:\cygwin\lib\boost_1_ 38_0\' 文件夹。
我正在尝试从他们网站的“入门”部分运行“example.cpp”程序: http://www.boost.org/doc/libs/1_35_0/more/getting_started/unix-variants.html
我正在使用简单的 Bash shell 命令行从创建示例文件的目录编译:'g++ -Wall example.cpp'
我不断收到消息: "boost/lambda/lambda.hpp: 没有这样的文件或目录"
我在命令行中尝试了所有可能的 -L、-l、-I 选项组合以包含目录,但无济于事。还尝试在我的 Windows 系统的 PATH 行中添加文件夹。
如何链接到 /boost 目录和所有子目录?头文件“lambda.hpp”正在调用子目录中的其他头文件。
【问题讨论】:
-
忘记包含程序:#include
#include #include #include int main() { using namespace boost::拉姆达; typedef std::istream_iterator in; std::for_each( in(std::cin), in(), std::cout -
最新版入门指南的链接是:boost.org/doc/libs/release/more/getting_started/…你链接到1.35。