Re: no member named 'unique_ptr' in namespace 'std'
Posted by
dxli on
Sep 22, 2015; 3:35pm
URL: https://forum.librecad.org/no-member-named-unique-ptr-in-namespace-std-tp5712294p5712295.html
Hi dreylago,
Just double checked: the MuParser code is correct with <memory> header for unique_ptr
You compiling command contains -std=c++11
I'm lost here, if the compiler is too old: g++-4.6 or earlier, -std=c++11 should have been rejected.
still, what's your gcc version?
g++ -v
dreylago wrote
Hi community,
I just cloned the repository, followed the homebrew install instructions in OSX, and tried to compile . The following is the very first warning and the first error message that followed. Any help is appreciated.... thanks....
=======================================================
g++ -c -pipe -g -O2 -Wall -W -fPIC -DQT_NO_DEBUG -I../../mkspec/macports -I. -I/usr/local/Cellar/qt/4.8.7/include -I../../generated/lib/libdxfrw/moc -o ../../generated/lib/libdxfrw/obj/libdwgr.o src/libdwgr.cpp
In file included from src/dl_writer_ascii.cpp:34:
src/dl_exception.h:51:9: warning: private field 'groupCode' is not used
[-Wunused-private-field]
int groupCode;
^
1 warning generated.
g++ -c -pipe -g -std=c++11 -O2 -Wall -W -fPIC -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_SHARED -I../../mkspec/macports -I. -I/usr/local/Cellar/qt/4.8.7/lib/QtSvg.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.7/lib/QtSvg.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.7/include -I../../generated/lib/jwwlib/moc -F/usr/local/Cellar/qt/4.8.7/lib -o ../../generated/lib/jwwlib/obj/dl_jww.o src/dl_jww.cpp
src/muParserTokenReader.cpp:151:10: error: no member named 'unique_ptr' in
namespace 'std'
std::unique_ptr<ParserTokenReader> ptr(new ParserTokenReader(*this));
~~~~~^