升压库出错

Error in boost library

本文关键字:出错      更新时间:2023-10-16

我正在尝试编译我的项目,它包含许多文件,需要3个库gsl、libxml、boost当我在ubuntu 14.04LTS 上向终端发出g++命令时

g++ -Wall -I/usr/include/libxml2 -I/usr/include/gsl main.cpp YUNucNet.cpp src/*.cpp -lxml2 -lgsl -lm -lgslcblas -lboost_system -lboost_filesystem

它给了我这些错误

In file included from /usr/include/boost/lexical_cast.hpp:34:0,
/usr/include/c++/4.8/typeinfo:39:37: error: expected ‘}’ before end of line
#pragma GCC visibility push(default)
                                 ^
/usr/include/c++/4.8/typeinfo:39:37: error: expected unqualified-id before end of line
/usr/include/c++/4.8/typeinfo:39:37: error: expected declaration before end of line

会有什么问题????我拿不到。

乙醇

默认值是一个c++11令牌。您需要使用-std=c++0x或类似的代码进行编译。确保你的gcc足够新,可以支持这样的事情。