作者apenptt (笔)
看板C_and_CPP
标题[问题] Boost安装的问题吧
时间Thu Feb 5 23:52:17 2009
想请教版上boost高手一个问题
我把boost建在codeblock的环境下
然後从网路上找了简单的code来试
#include <boost/thread/thread.hpp>
#include <iostream>
using namespace std;
void hello_world()
{
cout << "Hello world, I'm a thread!" << endl;
}
int main(int argc, char* argv[])
{
// 开始一条使用 "hello_world" function 的新执行绪
boost::thread my_thread(&hello_world);
// 等待执行绪完成工作
my_thread.join();
return 0;
}
codeblock可以顺利生出执行档,然而执行时却出现以下错误讯息
找不到boost_thread-mgw34-mt-1_37.dll
於是我在compiler setting/linker setting 中加入dll所在的路径
C:\Boost\lib\*.dll
错误还是会跑出来
请问版上的各位,这个问题该怎麽解决
谢谢!!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.113.251.130
1F:→ WPC001:dll不是给你拿来放在complier setting的... 02/06 00:46
2F:→ WPC001:dll该要放在"工作目录", 不然就直接狠一点放到system资料夹 02/06 00:52
3F:→ apenptt:谢谢 後来自己google dll的东西发现自己耍笨了 02/06 09:54
4F:→ apenptt:那请问要怎麽设定才能生出不需要dll的执行档 02/06 09:55
5F:→ WPC001:编译+连结时, 使用非dll版本的函式库... 02/06 22:40