(C++) wchar.h:718: error: expected initializer before 'throw' (while using arm-eabi)

February 24, 2017 · View on GitHub

 

 

 

 

 

(C++) BoostQt CreatorUbuntutoNDS wchar.h:718: error: expected initializer before 'throw' (while using arm-eabi)

 

Version of the compile error wchar.h:718: error: expected initializer before 'throw' when using arm-eabi, for example, when creating 'Hello Boost' using Qt Creator under Ubuntu for NDS.

 

 

 

 

 

 

Operating system(s) or programming environment(s)

 

IDE(s):

Project type:

  • console Console application

Compiler(s):

Libraries used:

 

 

 

 

 

Project file

 


 

 

 

 

 

Makefile used

 


 

 

 

 

 

Makefile generated by qmake

 

Results in the same error!

 


 

 

 

 

 

main.cpp

 


#include <iostream> #include <boost/regex.hpp> #include <nds.h> int main() {   //consoleDemoInit is obligatory   consoleDemoInit();   std::string s = "Hello World";   s = boost::regex_replace(s,boost::regex("World"),std::string("Boost"));   std::cout << s << '\n';   //Infinite waiting   while (1) {} }

 

 

 

 

 

Process

 

The project yielded this error in two ways:

  1. Doing a command-line make
  2. Running the program from Qt Creator

 

Hypothesis: arm-eabi (version 4.5.0) cannot compile this Boost library?