我尝试编译一个sa-mp插件(https://github.com/samp-incognito/samp-streamer-plugin/wiki),I已按照说明操作,但是出现了这个错误。
[ 14%] Building CXX object src/CMakeFiles/streamer_unity.dir/cotire/streamer_CXX_unity.cxx.o
In file included from /root/tmp2/samp-streamer-plugin/lib/boost/boost/config/compiler/gcc.hpp:165:0,
from /root/tmp2/samp-streamer-plugin/lib/boost/boost/config.hpp:39,
from /root/tmp2/samp-streamer-plugin/lib/boost/boost/bimap/bimap.hpp:52,
from /root/tmp2/samp-streamer-plugin/lib/boost/boost/bimap.hpp:13,
from /root/tmp2/samp-streamer-plugin/src/precompiled.h:35,
from /root/tmp2/samp-streamer-plugin/build/src/cotire/streamer_CXX_prefix.cxx:4,
from /root/tmp2/samp-streamer-plugin/build/src/cotire/streamer_CXX_prefix.hxx:4,
from <command-line>:0:
/usr/include/c++/6/cstddef:49:28: fatal error: bits/c++config.h: No such file or directory
#include <bits/c++config.h>
^
compilation terminated.
src/CMakeFiles/streamer_unity.dir/build.make:103: recipe for target 'src/CMakeFiles/streamer_unity.dir/cotire/streamer_CXX_unity.cxx.o' failed
make[3]: *** [src/CMakeFiles/streamer_unity.dir/cotire/streamer_CXX_unity.cxx.o] Error 1
CMakeFiles/Makefile2:98: recipe for target 'src/CMakeFiles/streamer_unity.dir/all' failed
make[2]: *** [src/CMakeFiles/streamer_unity.dir/all] Error 2
CMakeFiles/Makefile2:105: recipe for target 'src/CMakeFiles/streamer_unity.dir/rule' failed
make[1]: *** [src/CMakeFiles/streamer_unity.dir/rule] Error 2
Makefile:186: recipe for target 'streamer_unity' failed
make: *** [streamer_unity] Error 2
我试图找到config.h文件:
root@localhost:~/tmp2/samp-streamer-plugin/build# find /usr -name c++config.h
/usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h
/usr/include/x86_64-linux-gnu/c++/7/bits/c++config.h
/usr/include/x86_64-linux-gnu/c++/7/32/bits/c++config.h
/usr/include/x86_64-linux-gnu/c++/7/x32/bits/c++config.h
/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++config.h
/usr/include/x86_64-linux-gnu/c++/4.8/32/bits/c++config.h
/usr/include/x86_64-linux-gnu/c++/4.8/x32/bits/c++config.h
/usr/lib/gcc-snapshot/include/c++/8/x86_64-linux-gnu/bits/c++config.h
/usr/lib/gcc-snapshot/include/c++/8/x86_64-linux-gnu/32/bits/c++config.h
/usr/lib/gcc-snapshot/include/c++/8/x86_64-linux-gnu/x32/bits/c++config.h
我的GCC版本:gcc版本6.4.0 20171010(Ubuntu 6.4.0-8ubuntu1)