Solved no compiler on raspberry when launch qtcreator directly
-
yesterday, i try to install qt5 on rp3 , with command:
apt-get install qt5-default(qt5.3.2)
and apt-get install qtcreator (qtcreator 3.X).
then i try to launch qtcreator directly on rp3, i find there is no complier suitable for qt5.3 when i try to configure the options,
and the qtversion is :/usr/lib/arm-linux-gnueabihf/qt5/bin/qmake
is there some thing wrong with my rpi3?
or is the qt5-default just for cross compiler? -
@JiujiuTong You did not install C++ compiler (g++).
qt5-default only install Qt not the C++ compiler.
On Ubuntu you can just install build-essential package, not sure Debian provides it. If not install g++ package. -
@jsulm
but i remember i can find g++ in /usr/bin/ on my raspberry, anyway, i will check it again.
thank you!
another question :
from https://wiki.qt.io/RaspberryPi2EGLFS.
there is a tool download from "git clone https://github.com/raspberrypi/tools" .
what is the difference about provide by host's "g++" and "tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++" (describe in Qt Creator part)? -
@JiujiuTong If the compiler is there then in QtCreator go to "Tools/Options.../Compilers" and add the compiler there.
-
@jsulm
but still warns with on complier... ,so I'm confused
another question :
from https://wiki.qt.io/RaspberryPi2EGLFS.
there is a tool download from "git clone https://github.com/raspberrypi/tools" .
what is the difference about provide by host's "g++" and "tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++" (describe in Qt Creator part)? -
@JiujiuTong Does the compiler work? You can try to build a simple C++ app manually:
g++ -o testapp testapp.cpp
Did you add it manually?
If so then check your kit: "Tools/Options.../Kits" - there you need to select the compiler. -
@JiujiuTong I think tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ is for the host to cross compile.
-
@jsulm
yes, i try to add the g++ manully, but when i try to add the complier in kits tab, it failed as the qtcreator warns no compiler for the qtversion.
i may need to test the g++,thank you !