How start compiler in Ubuntu 20
-
@Mikeeeeee
You need to do just what @mrjj stated:- Open a console/terminal.
- Type:
export QT_DEBUG_PLUGINS=1
- Type the path to the Qt Creator executable to run it.
Because it has been run from a shell with that environment variable exported, you will get debug output showing you where it's looking for what, to diagnose your problem.
-
@Mikeeeeee said in How start compiler in Ubuntu 20:
I just copied what @mrjj typed. Correct is to remove the spaces:export QT_DEBUG_PLUGINS=1
If it had been me, I would have typed
man bash
and searched forexport
for myself:export [-fn] [name[=word]] ...
-
It doesn't issue any more errors.
I have only this build log:/home/admin1/Qt/5.15.0/gcc_64/bin/uic ../test/mainwindow.ui -o ui_mainwindow.h g++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../test -I. -I../../Qt/5.15.0/gcc_64/include -I../../Qt/5.15.0/gcc_64/include/QtWidgets -I../../Qt/5.15.0/gcc_64/include/QtGui -I../../Qt/5.15.0/gcc_64/include/QtCore -I. -isystem /usr/include/libdrm -I. -I../../Qt/5.15.0/gcc_64/mkspecs/linux-g++ -o main.o ../test/main.cpp g++ -pipe -g -std=gnu++11 -Wall -Wextra -dM -E -o moc_predefs.h ../../Qt/5.15.0/gcc_64/mkspecs/features/data/dummy.cpp g++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../test -I. -I../../Qt/5.15.0/gcc_64/include -I../../Qt/5.15.0/gcc_64/include/QtWidgets -I../../Qt/5.15.0/gcc_64/include/QtGui -I../../Qt/5.15.0/gcc_64/include/QtCore -I. -isystem /usr/include/libdrm -I. -I../../Qt/5.15.0/gcc_64/mkspecs/linux-g++ -o mainwindow.o ../test/mainwindow.cpp /home/admin1/Qt/5.15.0/gcc_64/bin/moc -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /home/admin1/QtProjects/build-test-Desktop_Qt_5_15_0_GCC_64bit-Debug/moc_predefs.h -I/home/admin1/Qt/5.15.0/gcc_64/mkspecs/linux-g++ -I/home/admin1/QtProjects/test -I/home/admin1/Qt/5.15.0/gcc_64/include -I/home/admin1/Qt/5.15.0/gcc_64/include/QtWidgets -I/home/admin1/Qt/5.15.0/gcc_64/include/QtGui -I/home/admin1/Qt/5.15.0/gcc_64/include/QtCore -I. -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include ../test/mainwindow.h -o moc_mainwindow.cpp g++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../test -I. -I../../Qt/5.15.0/gcc_64/include -I../../Qt/5.15.0/gcc_64/include/QtWidgets -I../../Qt/5.15.0/gcc_64/include/QtGui -I../../Qt/5.15.0/gcc_64/include/QtCore -I. -isystem /usr/include/libdrm -I. -I../../Qt/5.15.0/gcc_64/mkspecs/linux-g++ -o moc_mainwindow.o moc_mainwindow.cpp g++ -Wl,-rpath,/home/admin1/Qt/5.15.0/gcc_64/lib -o test main.o mainwindow.o moc_mainwindow.o /home/admin1/Qt/5.15.0/gcc_64/lib/libQt5Widgets.so /home/admin1/Qt/5.15.0/gcc_64/lib/libQt5Gui.so /home/admin1/Qt/5.15.0/gcc_64/lib/libQt5Core.so -lGL -lpthread
-
@Mikeeeeee
I don't understand. Your output now shows a compilation. I thought your problem as reported by you was when you tried to start an application:qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start ....I have not seen you reproduce that error message with the environment variable switched on.
-
That's why we are asking you to start your application with the QT_DEBUG_PLUGINS environment variable set so that it provides more information at run time about what is happening to the xcb plugin.
-
How are you using exactly ?
-
The folder has no influence on that environment variable. And are you starting your application from the same terminal were you defined the variable ?
-
As I already said: the folder has absolutely nothing to do with the environnement variable.
What do you mean by your restarted Qt ?
-
@Mikeeeeee
This really isn't very hard. You originally showedqt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-
You ran a program to get this. I don't know whether it was Qt Creator or your own application, but it was one of them, whichever. Right?
As we have already told you:
- Open a console/terminal.
- Type:
export QT_DEBUG_PLUGINS=1
- Type the path to Qt Creator or your own executable to run it. Whichever one caused your original error.
At this point you should get your error again, but this time the environment variable should cause debug output, stating which it can't load "xcb".
-
@Mikeeeeee Why is it so hard?! Do you know what a path is?
Just call QtCreator using full path to it, like:/home/YOUR_USER_NAME/Qt/Tools/QtCreator/bin/qtcreator.sh
"And maybe the QT_DEBUG_PLUGINS plugin doesn't work either?" - QT_DEBUG_PLUGINS is not a plug-in! You already was told that it is an environment variable. I suggest you learn what an environment variable is (something a software developer should know).