我对 Mingw 和 boost 有疑问。我用的是cygwin环境
#include <boost/thread.hpp>
#include <cmath>
int main(){ return 0; }
如果我使用此命令进行编译,我会收到以下错误
i686-pc-mingw32-g++ -std=c++11 test.cpp -o test.o
test.cpp:1:28: fatal error: boost/thread.hpp: No such file or directory
如果我包含/usr/include
获取 boost/thread.hpp,则似乎包含错误的 cmath 标头:
i686-pc-mingw32-g++ -std=c++11 -I/usr/include test.cpp -o test.o
In file included from /usr/lib/gcc/i686-pc-mingw32/4.7.3/include/c++/random:38:0,
from /usr/lib/gcc/i686-pc-mingw32/4.7.3/include/c++/bits/stl_algo.h:67,
from /usr/lib/gcc/i686-pc-mingw32/4.7.3/include/c++/algorithm:63,
from /usr/include/boost/smart_ptr/shared_ptr.hpp:42,
from /usr/include/boost/shared_ptr.hpp:17,
from /usr/include/boost/date_time/time_clock.hpp:17,
from /usr/include/boost/thread/thread_time.hpp:9,
from /usr/include/boost/thread/win32/thread_data.hpp:10,
from /usr/include/boost/thread/thread.hpp:15,
from /usr/include/boost/thread.hpp:13,
from test.cpp:1:
/usr/lib/gcc/i686-pc-mingw32/4.7.3/include/c++/cmath:1046:11: error: '::acoshl' has not been declared
/usr/lib/gcc/i686-pc-mingw32/4.7.3/include/c++/cmath:1050:11: error: '::asinhl' has not been declared
/usr/lib/gcc/i686-pc-mingw32/4.7.3/include/c++/cmath:1054:11: error: '::atanhl' has not been declared
....
我可以在这里做什么?