版本:Fedora release 25 (Twenty Five)
gcc version 6.3.1 20161221 (Red Hat 6.3.1-1) (GCC)
為什么單獨(dú)拿出來(lái)這個(gè)說(shuō)呢?
因?yàn)閺腉CC 6 開始荣病,gcc已經(jīng)提供cstdlib摩幔,這時(shí)如果在再使用-isystem瓶蝴,就會(huì)報(bào)錯(cuò)
In file included from /usr/include/c++/6.3.1/ext/string_conversions.h:41:0,? ? ? ? ? ?
?? ? from /usr/include/c++/6.3.1/bits/basic_string.h:5402,
? ? ? ? ? ? ? ? from /usr/include/c++/6.3.1/string:52,?
?? ? ? ? ? ? ? from /usr/include/c++/6.3.1/bits/locale_classes.h:40,? ??
? ? ? ? ? ? from /usr/include/c++/6.3.1/bits/ios_base.h:41,??
? ? ? ? ? ? ? from /usr/include/c++/6.3.1/iomanip:40,? ? ?
?? ? ? ? ? from dictionary.cpp:25:/usr/include/c++/6.3.1/cstdlib:75:25: fatal error: stdlib.h:?
No such file or directory #include_next^
需要修改
irstlm/src/Makefile.am
和
irstlm/src/Makefile.in
把里面的
AM_CXXFLAGS = -static -isystem/usr/include -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES $(BOOST_CPPFLAGS) -DMYCODESIZE=3
修改為:
AM_CXXFLAGS = -static -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES $(BOOST_CPPFLAGS) -DMYCODESIZE=3
這樣再運(yùn)行腳本 extras/install_irstlm.sh,就可以順利編譯了庐椒。