Now I'm trying to install RealPlexor by dklab, but it's falls with errors:
# bash ./Make.sh
In file included from dklab_realplexor.cpp:68:
utils/misc.h: In function ‘void die(std::string)’:
utils/misc.h:105: error: expected primary-expression before ‘[’ token
compilation terminated due to -Wfatal-errors.
Here is that line
s = regex_replace(s, regex("\\$!"), [](smatch s) { return strerrno(); });
Make sure that you are passing the following flag to your compiler (as described in the the g++ documentation):
-std=c++11
This tells the gcc compiler (g++) to compile your code with C++11 semantics.
The lambda expression syntax you are using (the part starting with []
) is a C++11 feature, and will cause compilers great confusion if it appears in code that they aren't expecting to be C++11.
However, as has been pointed out in another comment here (and is confirmed by this table, the version of gcc you are running (4.4.5, per a comment) doesn't have lambda expression support. May have to use a function object instead, or upgrade to a newer version of gcc/g++.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments