Running example 'widgets\graphicsview\boxes' under windows7, needs '-opengl desktop' error
-
The main thing you forgot is to add
-no-make tests -no-make examples
(it would have saved you time and disk space).The binaries (qmake and friends) are found in the bin folder.
mkspecs
are the configurations for the different platforms/devices. -
What I meant is that without that switch, it would compile all examples which is not what you want.
-
I do not think i follow you there SGaist. Are you saying, that if i used 'configure' without '-no-make examples' i would then be able to compile Qt with ALL examples?
I thought i specifically said i want to run the exmaple 'boxes', but cannot, because Qt was not configured with opengl desktop. And i am trying to get around that error.
I have now downloaded the newest version of Qt 5.12.3. This is what i have on my drive:
So now, i would open a command line console, go into the 'Src' folder and start the process of configuring and subsequently building Qt, righ?
All because i would like to be able to run the example 'boxes' which needs a Qt version configured to run opengl desktop. I also would like to use mingw instead of msvc.
So what would my configure command have to look like?
Here is my guess:
configure.bat -prefix 'path_to_folder' -opengl desktop -platform win32-g++
Am i missing something, or should i then be able to open the exmaple 'boxes' in Qt creator, select a kit and run the example?
Right now i am not concerned about saving time or diskspace. I am just not at the point where i understand the process enough to make meaningful decisions about streamlining the process.
-
The "-no-make example" just avoids the build system to build all examples as part of the build. They are still there, just not built.
One thing you should do is out of source builds. This will allow you to just nuke the build folder if something goes awry.
Your guess is correct, but at least add
-no-make tests
.Did you try my suggestion of forcing the backend selection ?
-
The "-no-make example" just avoids the build system to build all examples as part of the build. They are still there, just not built.
One thing you should do is out of source builds. This will allow you to just nuke the build folder if something goes awry.
Your guess is correct, but at least add
-no-make tests
.Did you try my suggestion of forcing the backend selection ?
@SGaist first off: no, i did not try your second suggestion. I might get back to that later. I basically just redownloaded anew (thats what you see in the filetree; thats whats on my drive after having downloaded only Qt source and the tools you see).
Now i tried to configure, mingw32-make.This was the result (the last command is the 'configure' i used):
-
i just reran mingw32-make and i got a different error:
g++ -c -include .pch\debug\lib_pch.h -fno-keep-inline-dllexport -g -Og -std=c++1y -fno-exceptions -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQDESIGNER_SDK_LIBRARY -DQDESIGNER_EXTENSION_LIBRARY -DQDESIGNER_UILIB_LIBRARY -DQDESIGNER_SHARED_LIBRARY -DQT_DESIGNER -DQT_USE_QSTRINGBUILDER -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_DESIGNER_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_NO_EXCEPTIONS -DQT_UIPLUGIN_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQT_UIPLUGIN_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -Iextension -Isdk -Ishared -I......\shared\qtpropertybrowser -I......\shared\deviceskin -I......\shared\findwidget -I......\shared\qtgradienteditor -Iuilib -I........\include -I........\include\QtDesigner -I........\include\QtDesigner\5.12.3 -I........\include\QtDesigner\5.12.3\QtDesigner -Itmp -ID:\Qt\5.12.3_online_installer\5.12.3\Src\qtbase\include\QtWidgets\5.12.3 -ID:\Qt\5.12.3_online_installer\5.12.3\Src\qtbase\include\QtWidgets\5.12.3\QtWidgets -ID:\Qt\5.12.3_online_installer\5.12.3\Src\qtbase\include\QtGui\5.12.3 -ID:\Qt\5.12.3_online_installer\5.12.3\Src\qtbase\include\QtGui\5.12.3\QtGui -ID:\Qt\5.12.3_online_installer\5.12.3\Src\qtbase\include\QtCore\5.12.3 -ID:\Qt\5.12.3_online_installer\5.12.3\Src\qtbase\include\QtCore\5.12.3\QtCore -I........\include\QtUiPlugin -ID:\Qt\5.12.3_online_installer\5.12.3\Src\qtbase\include -ID:\Qt\5.12.3_online_installer\5.12.3\Src\qtbase\include\QtWidgets -ID:\Qt\5.12.3_online_installer\5.12.3\Src\qtbase\include\QtGui -ID:\Qt\5.12.3_online_installer\5.12.3\Src\qtbase\include\QtXml -ID:\Qt\5.12.3_online_installer\5.12.3\Src\qtbase\include\QtCore -I.moc\debug -I.uic -ID:\Qt\5.12.3_online_installer\5.12.3\Src\qtbase\mkspecs\win32-g++ -o .obj\debug\qtgradientstopscontroller.o ......\shared\qtgradienteditor\qtgradientstopscontroller.cpp
......\shared\qtgradienteditor\qtgradientstopscontroller.cpp: In member function 'void QtGradientStopsControllerPrivate::enableCurrent(bool)':
......\shared\qtgradienteditor\qtgradientstopscontroller.cpp:99:9: error: invalid use of incomplete type 'class Ui::QtGradientEditor'
m_ui->positionLabel->setEnabled(enable);
^~
In file included from ......\shared\qtgradienteditor\qtgradientstopscontroller.cpp:40:0:
......\shared\qtgradienteditor\qtgradientstopscontroller.h:48:11: note: forward declaration of 'class Ui::QtGradientEditor'
class QtGradientEditor;
^~~~~~~~~~~~~~~~
......\shared\qtgradienteditor\qtgradientstopscontroller.cpp:100:9: error: invalid use of incomplete type 'class Ui::QtGradientEditor'
m_ui->colorLabel->setEnabled(enable);
^~
In file included from ......\shared\qtgradienteditor\qtgradientstopscontroller.cpp:40:0:
......\shared\qtgradienteditor\qtgradientstopscontroller.h:48:11: note: forward declaration of 'class Ui::QtGradientEditor'
class QtGradientEditor;
^~~~~~~~~~~~~~~~
......\shared\qtgradienteditor\qtgradientstopscontroller.cpp:101:9: error: invalid use of incomplete type 'class Ui::QtGradientEditor'
m_ui->hLabel->setEnabled(enable);
^~
In file included from ......\shared\qtgradienteditor\qtgradientstopscontroller.cpp:40:0:
......\shared\qtgradienteditor\qtgradientstopscontroller.h:48:11: note: forward declaration of 'class Ui::QtGradientEditor'
class QtGradientEditor;
^~~~~~~~~~~~~~~~
......\shared\qtgradienteditor\qtgradientstopscontroller.cpp:102:9: error: invalid use of incomplete type 'class Ui::QtGradientEditor'
m_ui->sLabel->setEnabled(enable);
^~
In file included from ......\shared\qtgradienteditor\qtgradientstopscontroller.cpp:40:0:
......\shared\qtgradienteditor\qtgradientstopscontroller.h:48:11: note: forward declaration of 'class Ui::QtGradientEditor'
class QtGradientEditor;
^~~~~~~~~~~~~~~~
......\shared\qtgradienteditor\qtgradientstopscontroller.cpp:103:9: error: invalid use of incomplete type 'class Ui::QtGradientEditor'
m_ui->vLabel->setEnabled(enable);
^~
In file included from ......\shared\qtgradienteditor\qtgradientstopscontroller.cpp:40:0:
......\shared\qtgradienteditor\qtgradientstopscontroller.h:48:11: note: forward declaration of 'class Ui::QtGradientEditor'
class QtGradientEditor;
^~~~~~~~~~~~~~~~
......\shared\qtgradienteditor\qtgradientstopscontroller.cpp:104:9: error: invalid use of incomplete type 'class Ui::QtGradientEditor'
m_ui->aLabel->setEnabled(enable);and it goes on for quite a while until
Makefile.Debug:28987: recipe for target '.obj/debug/qtgradientstopscontroller.o' failed
mingw32-make[6]: *** [.obj/debug/qtgradientstopscontroller.o] Error 1
mingw32-make[6]: Leaving directory 'D:/Qt/5.12.3_online_installer/5.12.3/Src/qttools/src/designer/src/lib'
Makefile:42: recipe for target 'debug-all' failed
mingw32-make[5]: *** [debug-all] Error 2
mingw32-make[5]: Leaving directory 'D:/Qt/5.12.3_online_installer/5.12.3/Src/qttools/src/designer/src/lib'
Makefile:97: recipe for target 'sub-lib-make_first' failed
mingw32-make[4]: *** [sub-lib-make_first] Error 2
mingw32-make[4]: Leaving directory 'D:/Qt/5.12.3_online_installer/5.12.3/Src/qttools/src/designer/src'
Makefile:42: recipe for target 'sub-src-make_first' failed
mingw32-make[3]: *** [sub-src-make_first] Error 2
mingw32-make[3]: Leaving directory 'D:/Qt/5.12.3_online_installer/5.12.3/Src/qttools/src/designer'
Makefile:77: recipe for target 'sub-designer-make_first' failed
mingw32-make[2]: *** [sub-designer-make_first] Error 2
mingw32-make[2]: Leaving directory 'D:/Qt/5.12.3_online_installer/5.12.3/Src/qttools/src'
Makefile:44: recipe for target 'sub-src-make_first' failed
mingw32-make[1]: *** [sub-src-make_first] Error 2
mingw32-make[1]: Leaving directory 'D:/Qt/5.12.3_online_installer/5.12.3/Src/qttools'
Makefile:971: recipe for target 'module-qttools-make_first' failed
mingw32-make: *** [module-qttools-make_first] Error 2I was unaware, that building Qt from source would pose such a big problem...
-
These are parts of the tests. I currently don't know why it's failing like that however, you really should add
-no-make tests
to your configure options. AFAIK, you are not going to hack on Qt so it makes little sense to build all Qt's tests to get the build you are looking for. -
-
I will try the configure with -nomake tests and then run mingw32-make and see what happens. Do i need to revert anything before i run configure and mingw32-make again? BTW thank you for taking the time to help me out here. Highly appreciated.
@TopDoozer said in Running example 'widgets\graphicsview\boxes' under windows7, needs '-opengl desktop' error:
Do i need to revert anything before i run configure and mingw32-make again?
You should start from clean state. Best is to use out of source builds.
-
OK. So i now created a 'build' folder. Opened a console in that folder and called configure.bat from there. This is the configure.log file:
Command line: -prefix d:\Qt\Qt5.12.3\build -opengl desktop -nomake tests
I do have a configure.log file.... but i cannot upload it and its toolong to post in toto.
There are a couple of configure tests that fail:executing config test alloca_h
- cd /d D:\Qt\Qt5.12.3\build\config.tests\alloca_h && D:\Qt\Qt5.12.3\build\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" D:/Qt/Qt5.12.3/build/config.tests/alloca_h
- cd /d D:\Qt\Qt5.12.3\build\config.tests\alloca_h && set MAKEFLAGS=& mingw32-make
g++ -c -fno-keep-inline-dllexport -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -I. -ID:\Qt\Qt5.12.3\5.12.3\Src\qtbase\mkspecs\win32-g++ -o main.o main.cpp
main.cpp:2:20: fatal error: alloca.h: No such file or directory
#include <alloca.h>
^
compilation terminated.
Makefile:165: recipe for target 'main.o' failed
mingw32-make: *** [main.o] Error 1
test config.qtbase.tests.alloca_h FAILEDis the first one...
-
OK. So i now created a 'build' folder. Opened a console in that folder and called configure.bat from there. This is the configure.log file:
Command line: -prefix d:\Qt\Qt5.12.3\build -opengl desktop -nomake tests
I do have a configure.log file.... but i cannot upload it and its toolong to post in toto.
There are a couple of configure tests that fail:executing config test alloca_h
- cd /d D:\Qt\Qt5.12.3\build\config.tests\alloca_h && D:\Qt\Qt5.12.3\build\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" D:/Qt/Qt5.12.3/build/config.tests/alloca_h
- cd /d D:\Qt\Qt5.12.3\build\config.tests\alloca_h && set MAKEFLAGS=& mingw32-make
g++ -c -fno-keep-inline-dllexport -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -I. -ID:\Qt\Qt5.12.3\5.12.3\Src\qtbase\mkspecs\win32-g++ -o main.o main.cpp
main.cpp:2:20: fatal error: alloca.h: No such file or directory
#include <alloca.h>
^
compilation terminated.
Makefile:165: recipe for target 'main.o' failed
mingw32-make: *** [main.o] Error 1
test config.qtbase.tests.alloca_h FAILEDis the first one...
@TopDoozer Failing tests are normal. The question is: is any feature you need disabled because of failing tests? If not then just build.
-
@jsulm are you suggesting, that build might fail if i try to run it with a feature that might not have passed the configure test (running nmake right now but expecting it to fail again)?
@TopDoozer No, it should not fail, but some features will not be built.
-
Tried something else again. went and ran configure in the source directory (Command line: -prefix d:\Qt\Qt5.12.3\build2 -opengl desktop -nomake tests -nomake examples). Then i ran mingw32-make in the Source folder. Thats what i got:
Anyone any idea, what the hell is going on here? I am starting to think Qt might not be worth it anymore trying to get back into, which would be fine crying shame!
-
Tried something else again. went and ran configure in the source directory (Command line: -prefix d:\Qt\Qt5.12.3\build2 -opengl desktop -nomake tests -nomake examples). Then i ran mingw32-make in the Source folder. Thats what i got:
Anyone any idea, what the hell is going on here? I am starting to think Qt might not be worth it anymore trying to get back into, which would be fine crying shame!
@TopDoozer Which version of MinGW do you use to compile?