juef17/LibreBridge

Compilation errors

Jerther opened this issue · 5 comments

Compilation seems to depends on qt-devel actually, and also on g++ (gcc-c++) but then compilation fails:

[jerther@localhost LibreBridge]$ make
g++ -c -pipe -Wall -Wextra -pedantic -fPIC -O2 -Wall -W -D_REENTRANT -DVERSION_MAJOR=0 -DVERSION_MINOR=1 -DVERSION_BUILD=0 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -o AIPlayer.o src/AIPlayer.cpp
g++ -c -pipe -Wall -Wextra -pedantic -fPIC -O2 -Wall -W -D_REENTRANT -DVERSION_MAJOR=0 -DVERSION_MINOR=1 -DVERSION_BUILD=0 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -o Bid.o src/Bid.cpp
g++ -c -pipe -Wall -Wextra -pedantic -fPIC -O2 -Wall -W -D_REENTRANT -DVERSION_MAJOR=0 -DVERSION_MINOR=1 -DVERSION_BUILD=0 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -o Card.o src/Card.cpp
g++ -c -pipe -Wall -Wextra -pedantic -fPIC -O2 -Wall -W -D_REENTRANT -DVERSION_MAJOR=0 -DVERSION_MINOR=1 -DVERSION_BUILD=0 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -o Contract.o src/Contract.cpp
g++ -c -pipe -Wall -Wextra -pedantic -fPIC -O2 -Wall -W -D_REENTRANT -DVERSION_MAJOR=0 -DVERSION_MINOR=1 -DVERSION_BUILD=0 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -o Game.o src/Game.cpp
src/Game.cpp: In member function ‘void Game::deal()’:
src/Game.cpp:56:16: error: ‘default_random_engine’ was not declared in this scope
  auto engine = default_random_engine{getSeed()};
                ^~~~~~~~~~~~~~~~~~~~~
Makefile:286: recipe for target 'Game.o' failed
make: *** [Game.o] Error 1

My output from qmake --version is the following:

QMake version 3.1
Using Qt version 5.8.0 in /home/francois/Settings/Qt/5.8/gcc_64/lib

So no qt-dev... I've shown you mine, now show me yours! :P

[jerther@localhost LibreBridge]$ qmake-qt4 --version
QMake version 2.01a
Using Qt version 4.8.7 in /usr/lib64

Using Fedora 25 btw. Hmm, looks like Fedora's package is outdated. Which distro are you using?

Linux Lite 3.4, but I installed that Qt version manually, I'm not sure which Qt package is available for it. I will update the build instructions with this info!

Okay so I did install qt5-devel instead of qt-devel. Still getting the same error:

[jerther@localhost LibreBridge]$ qmake-qt5
[jerther@localhost LibreBridge]$ make
g++ -c -pipe -Wall -Wextra -pedantic -fPIC -O2 -std=gnu++1y -Wall -W -D_REENTRANT -fPIC -DVERSION_MAJOR=0 -DVERSION_MINOR=1 -DVERSION_BUILD=0 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o Game.o src/Game.cpp
src/Game.cpp: In member function ‘void Game::deal()’:
src/Game.cpp:56:16: error: ‘default_random_engine’ was not declared in this scope
  auto engine = default_random_engine{getSeed()};
                ^~~~~~~~~~~~~~~~~~~~~
Makefile:680: recipe for target 'Game.o' failed
make: *** [Game.o] Error 1
[jerther@localhost LibreBridge]$ g++ --version
g++ (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
[jerther@localhost LibreBridge]$ qmake-qt5 --version
QMake version 3.0
Using Qt version 5.7.1 in /usr/lib64

Should I try an even more recent version of qmake?

https://www.youtube.com/watch?v=v7BkdARYNAE

Try adding #include <random> with the other includes in Game.cpp.

I'm on an earlier version of g++ (5.4.0) but I doubt that's the problem.