Thanks for info, topguy!
I did what's laid out in the second link you posted and I can see a few versions of Qt in the system:
Code: Select all
pi@raspberrypi:~/TestConsole $ qtchooser -list-versions
4
5
default
qt4-arm-linux-gnueabihf
qt4
qt5-arm-linux-gnueabihf
qt5
Then I added
export QT_SELECT=5 to my ~/.bashrc file:
Once I did that, I am able to run following:
Code: Select all
pi@raspberrypi:~/TestConsole $ qmake -v
QMake version 3.0
Using Qt version 5.3.2 in /usr/lib/arm-linux-gnueabihf
But if tried to generate a makefile like below, it complained the same thing. It seemed like the linking system is somehow broken, it kept trying to use qt4 which doesn't have qmake under its folder.
Code: Select all
pi@raspberrypi:~/TestConsole $ sudo qmake TestConsole.pro
qmake: could not exec '/usr/lib/arm-linux-gnueabihf/qt4/bin/qmake': No such file or directory
So I thought maybe I can just put in the full path when I use qmake and when I did, I am able to generate a makefile
Code: Select all
pi@raspberrypi:~/TestConsole $ sudo /usr/lib/arm-linux-gnueabihf/qt5/bin/qmake TestConsole.pro
Following issue showed up and I suppose the make system coulnd't find the Qt framework/library. Do I need to install any other dependency for this to work?
Code: Select all
pi@raspberrypi:~/TestConsole $ sudo make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_CORE_LIB -I/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -I. -isystem /usr/include/arm-linux-gnueabihf/qt5 -isystem /usr/include/arm-linux-gnueabihf/qt5/QtCore -I. -o main.o main.cpp
main.cpp:1:28: fatal error: QCoreApplication: No such file or directory
#include <QCoreApplication>
^
compilation terminated.
Makefile:287: recipe for target 'main.o' failed
make: *** [main.o] Error 1
pi@raspberrypi:~/TestConsole $
Here's the generated Makefile if needed :
https://gist.github.com/anonymous/3835aaa3b0e83c3d6183 I also tried:
export QT_SELECT=qt5 instead of
export QT_SELECT=5 but it doesn't help.