-2

I'm trying to compile my project, it contains many files and it need 3 libraries gsl,libxml,boost when i give the terminal the g++ command on ubuntu 14.04LTS

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

it gives me these error

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

what would be the problem ???? I can't get it .

thanx

M.Talafha
  • 7
  • 6

1 Answers1

0

default is a c++11 token. You need to compile with -std=c++0x or something similar. Make sure your gcc is new enough to support such things.

Clusty
  • 117
  • 7
  • how i can do that ?? – M.Talafha Jul 28 '16 at 10:38
  • You are really not making it easy for you... g++ -std=c++0x -Wall -I/usr/include/libxml2 -I/usr/include/gsl main.cpp YUNucNet.cpp src/*.cpp -lxml2 -lgsl -lm -lgslcblas -lboost_system -lboost_filesystem As I suggested – Clusty Jul 28 '16 at 18:11
  • still it gives me these Errors In file included from /usr/include/features.h:374:0, from /usr/include/x86_64-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/4.8/bits/c++config.h:426, from /usr/include/c++/4.8/iostream:38, from main.cpp:1: /usr/include/math.h:28:1: error: expected unqualified-id before string constant __BEGIN_DECLS ^ main.cpp:13:2: error: expected ‘}’ at end of input }; – M.Talafha Jul 30 '16 at 18:42