Compile error
Posted by
Effad on
Mar 13, 2014; 6:38pm
URL: https://forum.librecad.org/Compile-error-tp5709682.html
I have just tried to compile LibreCAD on a LinuxCNC installation, which is based on the (admittedly rather old) Ubuntu 10.04 LTS distribution.
I have found the hint in common.pri about custom.pro containing CXX_CPP11_FLAG, but the compilation still fails.
Here is what I did:
rli@cncsim:~/devel$ git clone https://github.com/LibreCAD/LibreCAD.git
Initialized empty Git repository in /home/rli/devel/LibreCAD/.git/
remote: Reusing existing pack: 28199, done.
remote: Total 28199 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (28199/28199), 54.27 MiB | 3.60 MiB/s, done.
Resolving deltas: 100% (21610/21610), done.
rli@cncsim:~/devel$ cd LibreCAD/
rli@cncsim:~/devel/LibreCAD$ echo "CXX_CPP11_FLAG = -std=c++0x" > custom.pro
rli@cncsim:~/devel/LibreCAD$ qmake librecad.pro
rli@cncsim:~/devel/LibreCAD$ make
cd libraries/ && /usr/bin/qmake /home/rli/devel/LibreCAD/libraries/libraries.pro -unix -o Makefile
cd libraries/ && make -f Makefile
make[1]: Betrete Verzeichnis '/home/rli/devel/LibreCAD/libraries'
...
g++ -c -pipe -std=c++0x -g -O2 -Wall -W -D_REENTRANT -I/usr/include/muParser -DQC_APPKEY="/LibreCAD" -DQC_APPNAME="LibreCAD" -DQC_COMPANYNAME="LibreCAD" -DQC_COMPANYKEY="LibreCAD" -DQC_VERSION="master" -DQC_DELAYED_SPLASH_SCREEN=1 -DHAS_BOOST=1 -DQC_SCMREVISION="2.0.2-24-ga25e73a" -DQC_APPDIR="librecad" -DQINITIMAGES_LIBRECAD=qInitImages_librecad -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I/usr/include/qt4/QtHelp -I/usr/include -I../../libraries/libdxfrw/src -I../../libraries/jwwlib/src -Icmd -Ilib/actions -Ilib/creation -Ilib/debug -Ilib/engine -Ilib/fileio -Ilib/filters -Ilib/gui -Ilib/information -Ilib/math -Ilib/modification -Ilib/scripting -Iactions -Imain -Iplugins -Iui -Iui/forms -I../res -I../../generated/librecad/moc -I../../generated/librecad/ui -o ../../generated/librecad/obj/rs_entitycontainer.o lib/engine/rs_entitycontainer.cpp
lib/engine/rs_entitycontainer.cpp: In member function ‘virtual void RS_EntityContainer::draw(RS_Painter*, RS_GraphicView*, double&)’:
lib/engine/rs_entitycontainer.cpp:1892: error: expected primary-expression before ‘[’ token
lib/engine/rs_entitycontainer.cpp:1892: error: expected primary-expression before ‘]’ token
lib/engine/rs_entitycontainer.cpp:1892: error: expected primary-expression before ‘const’
lib/engine/rs_entitycontainer.cpp:1892: error: expected primary-expression before ‘const’
lib/engine/rs_entitycontainer.cpp:1892: error: expected unqualified-id before ‘bool’
lib/engine/rs_entitycontainer.cpp:1904: error: expected initializer before ‘:’ token
lib/engine/rs_entitycontainer.cpp:1907: error: expected primary-expression before ‘}’ token
lib/engine/rs_entitycontainer.cpp:1907: error: expected ‘;’ before ‘}’ token
lib/engine/rs_entitycontainer.cpp:1907: error: expected primary-expression before ‘}’ token
lib/engine/rs_entitycontainer.cpp:1907: error: expected ‘)’ before ‘}’ token
lib/engine/rs_entitycontainer.cpp:1907: error: expected primary-expression before ‘}’ token
lib/engine/rs_entitycontainer.cpp:1907: error: expected ‘;’ before ‘}’ token
make[2]: *** [../../generated/librecad/obj/rs_entitycontainer.o] Fehler 1
make[2]: Verlasse Verzeichnis '/home/rli/devel/LibreCAD/librecad/src'
make[1]: *** [sub-src-make_default] Fehler 2
make[1]: Verlasse Verzeichnis '/home/rli/devel/LibreCAD/librecad'
make: *** [sub-librecad-make_default-ordered] Fehler 2
rli@cncsim:~/devel/LibreCAD$
I don't know if this is a specific C++11 syntax issue or if the compilation fails on more modern platforms too.
Best regards,
Robert