【发布时间】:2013-06-17 11:57:50
【问题描述】:
我在编译示例表单 LenMuse - this is the example 时遇到问题。
我使用了提供的教程中的标志,并添加了一些标志来解决其他一些问题,但我无法解决所有问题。这是我从 gcc 的输出:
/usr/lib/liblomse.so: undefined reference to `boost::thread::start_thread()'
/usr/lib/liblomse.so: undefined reference to `boost::thread::timed_join(boost::posix_time::ptime const&)'
/usr/lib/liblomse.so: undefined reference to `boost::this_thread::sleep(boost::posix_time::ptime const&)'
/usr/lib/liblomse.so: undefined reference to `boost::thread::~thread()'
这是我使用的命令:
gcc interface.cpp -o interface `pkg-config --cflags x11` `pkg-config --cflags liblomse` `pkg-config --libs liblomse` `pkg-config --libs x11` -lstdc++ -lboost_system -I/usr/include/boost/ -lboost_filesystem -lboost_thread
我尝试使用标志 -lboost_thread-mt 进行编译,但 gcc 找不到该标志。
我有 boost 1.53.0,在页面上作者说需要 boost 1.43 或更高版本。我的系统是 ArchLinux。
【问题讨论】:
-
请回答您自己的问题,而不是直接用答案编辑问题。