I have application created with QT5 and Visual Studio 2013. I also use QT WebEngine in my application.
My application works fine in windows 7 (32 bit) . For some reason i need to run it in windows xp sp3 (32 bit).
When i run it, I get the following error:
The procedure entry point strnlen could not be located in the dynamic link library msvcrt.dll
I press OK several time and it goes away and my QMainWindow will pop out, But its totally BLACK and i see the following errors in debugger.
class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(class QFlags<enum QWindowsOpenGLTester::Renderer>): Could not initialize EGL display: error 0x3001
class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(class QFlags<enum QWindowsOpenGLTester::Renderer>): When using ANGLE, check if d3dcompiler_4x.dll is available
The d3dcompiler_47.dll is in application directory too.
Whats wrong here?
UPDATE 1
I placed 3dcompiler_46.dll in executable's directory and this is what happened.
I still get The procedure entry point strnlen could not be located in the dynamic link library msvcrt.dll error but after i press Ok, I get the following error as well.
The procedure entry point _except_handler4_common could not be located in the dynamic link library msvcrt.dll
The QMainWindow is still BLACK and the errors about ANGLE is the same.
UPDATE 2
I build QT for Windows XP with following configuration
configure -release -opensource -opengl desktop -target xp -platform win32-msvc2013 -angle -icu -nomake examples -prefix C:\QT-Compile
I replaced QT dependency and ran my application, I got the following errors:
The application has failed to start because icuin56.dll was not found
The application has failed to start because icuuc56.dll was not found
I tried to find them in QT directory (C:\QT-Compile) and i couldn't but i had them on main machine that run in Windows Seven, I placed them next to executable and application run successfully and previous errors are gone, However, The QMainWindow is still BLACK and i have the following errors in my debugger in run time.
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
bool __thiscall QOpenGLTextureBlitter::create(void) Could not link shader program:
Whats wrong now ?
UPDATE 3
This is how i configured QT.
configure -release -opensource -opengl dynamic -target xp -platform win32-msvc2013 -icu -nomake examples -prefix C:\QT-Compile
I used windeployqt.exe and placed required DLLs and ... next to executable.
Ran application in windows xp and i keep getting following errors then application crash.
Message Box :
The procedure entry point strnlen could not be located in the dynamic link library msvcrt.dll
QT Debugger :
class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(class QFlags<enum QWindowsOpenGLTester::Renderer>): Could not initialize EGL display: error 0x3001
class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(class QFlags<enum QWindowsOpenGLTester::Renderer>): When using ANGLE, check if d3dcompiler_4x.dll is available
Failed to load opengl32sw.dll (The specified module could not be found.)
class QOpenGLStaticContext *__cdecl QOpenGLStaticContext::create(bool): Failed to load and resolve WGL/OpenGL functions
The first error about msvcrt.dll is about not including visual studio runtime dlls with your binary file. It seems that on win XP machine these libs are different then the ones your app is linked against
The next two errors are about failing to start up ANGLE probably due to mismatch of MS VS runtimes that you have encountered previously.
Basically, just put msvcr110.dll and msvcp110.dll in your folder (or provide means to install MS VS Redistributable for 2013 Studio)
Here is detailed deployment doc from digia - http://doc.qt.io/qt-5/windows-deployment.html
Also i would advice you to use qt's tool windeployqt.exe as a part of deploy process.
Usage is simple - windeployqt.exe path/to/your/binary/file.exe
It will copy almost everything you app needs to run your app everywhere without bothering you to include some plugins and dlls etc (though it will not copy mentioned above MSVS runtime dlls)
Also if you are interested a post about using different opengl for qt5 built dynamically loading of graphical drivers ( tries to use default opengl -> is fails tries to use ANGLE -> if fails, tries to use opengl software (libmesa) ) - http://doc.qt.io/qt-5/windows-requirements.html#dynamically-loading-graphics-drivers
It's a bit more complicated then in Qt4, but when you finally handle it properly, it will be more fail safe even on machines with no graphical drivers or no direct X support or launched through VPN
UPDATE
It seems that both desktop opengl and ANGLE fails for you (which would mean, that you have OpenGL implementation version less then 3.0 (default on win xp has 2.0) for desktop opengl to fail and you don't have DirectX 11 or DirectX 9 correct drivers installed (for ANGLE to fail).
This would mean that this is either virtual machine or window without any drivers. To fix this issue, please include opengl32sw.dll (libmesa) to you executable file as well. This is another fallback in case both desktop and ANGLE failed.
You can take in from the folder where your QtCreator installed in folder /tools. Or download it here - http://download.qt.io/development_releases/prebuilt/llvmpipe/windows/
depending on your arch.
Also, try to put d3dcompiler_46.dll from your win xp next to your executable. This might fix runtime error and will allow to launch ANGLE - https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG-44985
Update 2:
Let's get it line by line.
You've got The procedure entry point strnlen could not be located in the dynamic link library msvcrt.dll warning because of either you have win XP with not SP3 but SP2 (microsoft dropped support for win XP SP2 for MSVS 2013) - more details here where there is the same issue. Or there is the same bug here that would basically advice to use opengl software.
Now, the errors you see in log:
class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(class QFlags<enum QWindowsOpenGLTester::Renderer>): Could not initialize EGL display: error 0x3001 - this is failure of OpenGL desktop, since you don't have Open GL 2.0 -> proper graphical driver.
class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(class QFlags<enum QWindowsOpenGLTester::Renderer>): When using ANGLE, check if d3dcompiler_4x.dll is available - ANGLE is failed. Because either - qt uses mvcrt.dll for MSVS 2013 that does not support your Win XP SP2 anymore or you don't have d3dcompiler. Perhaps it will work with Qt 5.4 built with MSVS 2008 or MSVS 2012.
Failed to load opengl32sw.dll (The specified module could not be found.)
class QOpenGLStaticContext *__cdecl QOpenGLStaticContext::create(bool): Failed to load and resolve WGL/OpenGL functions - These errors relates to missing opengl32sw.dll file. Which i've already provided link for you to download and put to executable.
And app crashes because Qt was not able to run any of OpenGl modes at all. So basically all you can do is force app to use OpenGL software (i provided link for you how to do this numerous times, please read those guide.) or use qt 5.4 and try to run angle. OpenGL software may not run smoothly and have some problems with complex graphical interfaces but this is basically the only thing that is left.
We met the same problem in win 7, solved by install the graphics card driver
I have found another solution as a side option to switch from opengl to software rasterizer and remove these messages:
Could not initialize EGL display: error 0x3001
When using ANGLE, check if d3dcompiler_4x.dll is available
Because in mine case it was the VirtualBox environment which currently having problems with the OpenGL/DirectX (https://forums.virtualbox.org/viewtopic.php?t=82614&start=15#p408392) implementation, then i have tried to search for a solution and somehow workaround the render.
The QT itself have has an option to switch or disable several builtin options w/o need to rebuild anything. Such as is described here:
https://doc.qt.io/qt-5/windows-requirements.html#dynamically-loading-graphics-drivers
It is possible to provide a JSON-format configuration file specifying which OpenGL implementation to use depending on the graphics card and driver version. The location is given by the environment variable QT_OPENGL_BUGLIST. Relative paths are resolved using QLibraryInfo::SettingsPath or QStandardPaths::ConfigLocation. The file utilizes the format of the driver bug list used in The Chromium Projects. It consists of a list of entries each of which specifies a set of conditions and a list of feature keywords. Typically, device id and vendor id are used to match a specific graphics card. They can be found in the output of the qtdiag or dxdiag tool.
The qtdiag tool is stored basically near the qmake executable. You can additionally run it to diagnose the end system on other errors.
For the VirtualBox you can try this:
{
"entries": [
{
"id": 1,
"description": "Software OpenGL rasterizer (opengl32sw.dll)",
"os": {
"type": "win"
},
"vendor_id": "0x80EE",
"device_id": ["0xBEEF"],
"driver_version": {
"op": "<=",
"value": "5.1.38.22592"
},
"features": [
"disable_desktopgl", "disable_angle"
]
}
]
}
, Where:
disable_desktopgl, disable_angle - When no accelerated path is desired. This ensures that the only option Qt tries is the sofware rasterizer (opengl32sw.dll). Can be useful in virtual machines and applications that are deployed on a wide range of old systems.
the 5.1.38.22592 is a version of the VirtualBox.
This is might be not what you search for, but i didn't found it in time for myself.
Related
I'm working with a DEBIAN OS that it have an enviroment configured to work with a cross platform arm device with yocto.
After following the provider instructions:
Set up OS env with a script
open qtcreator from a terminal with the custom enviroment
add a kit with custom qmake, gcc and gdb (there is no warning)
add the device sysroot & ip (all tests ok)
Seems like all is ok but when i try to apply this changes i receive the following message:
Failed to set up kit for Qbs: Could no determine whether Qt is a
static build.
and the kit is not appearing when i try to create a new project.
i already check this pages and all explained there is done:
http://doc.qt.io/qtcreator/creator-targets.html
https://support.emtrion.de/en/details_operating-systems/linux-37.html?file=files/content/emtrion/downloads/emLinux-documentation-v008en.pdf
any clue about what is going wrong here?
Thanks by your time.
EDIT
i'm using qt-creator 4.7 and the current configuration works properly at 4.2 version.
the Qt version used fot the kit give the follow message at both versions:
ABI detection failed: Make sure to use a matching compiler when building
here is an open post with a similar unsolved issue:
https://forum.qt.io/topic/88857/my-kit-isn-t-showing-up/15
I installed BlackBerry NDK including IDE and downloaded the SDK. Now, I already set up Qt-Creator 2.8.1, 2.8.0, 2.6.2... In every version there is another problem with the build settings. The most appropriate try was with 2.6.2 and manually setting up the BB10 integration.
BB10 NDK Version: 10.1 for Target 10.1.0.4633 armv7le-v7
Creator is always started with bbnk-env.bat called before.
2.6.2:
Compiler set to GCC with custom-arm-linux-generic-elf-32bit as proposed by https://developer.blackberry.com/native/documentation/core/qt_porting_tools.html
(I do have a second compiler set to unix instead of linux)
QT-Version provided by Blackberry NDK, Qt 4.8.5 within %BBNDK%\host_10_1_0_238\win32\x86\usr\bin\qmake.exe.
Devices: BBZ10 is connected and accessible. QtCreator successfully connects and can use the debugToken.
Now the problem is within the Kits: Created a kit for BBZ10, having the bbZ10 Device, bbndk\target_10_1_0_4633\qnx6\armle-v7 as sysroot, compiler (set for linux), gdb to ntoarm-gdb.exe, QT-Version to configured 4.8.5. I can now try any mkspec it always gives me the error (translated from german)
No mkspec found for given QT Version
Für diese QT Version wurde keine mkspec gefunden
I think the mkspecs are set to compile to unix-target, while the 4.5qt supplied with the sdk requires to be linux target (where in reality target is QNX)
Somehow i can compile with this version, but first i am not sure if this creates a correct executable, even more i cannot deploy the executable, since QT-Creator does not create the bar-descriptor.xml file...
2.8.1:
Using the same setup as in 2.6 (after having 2.6 QT Version configured) i am able to get to the same error. Using the "new" configuration system under "BlackBerry" page in settings i cannot correctly set up NDK Path. Will always tell me (translated from german)
Following problems were encountered during BB10 configuration:
No QT-Version found
No GCC compiler found
No GDB Debugger for BB10 Comiler found
No GDB Debugger for BB10 Simulator found
Has anyone successfully configured bb10 ndk to use with qt-creator (2.6/2.8.1) and encountered similar trouble?
How can i solve this issue?
Solved:
After 24 hours trying, installing, reinstalling, editing, crying... I reinstalled complete NDK and QtCreator 2.8 and edited bbndk-env_10_1_0_4633.bat.
I removed every Variable from batch file and set it to corresponding values, e.g. replace every %BASE_DIR% with your acutal base-dir (i.e. D:\bbndk).
For conveniance usage i craeted another batchfile, calling the bbndk-env batch and starting qt-creator.
Set Compiler, Qt-Version, Kits in Creator-Settings as described in https://developer.blackberry.com/native/documentation/core/qt_porting_tools.html
Keep mkspecs line under Kits-tab empty
Thank You
I have installed Qt 5.0.1 - 32-bit Version on Ubuntu 12.04. All the programs crash at startup with the following messages :
The program has unexpectedly finished.
/home/manager/Qt5.0.1/5.0.1/gcc/examples/opengl/2dpainting-build-Desktop_Qt_5_0_1_GCC_32bit-Debug/2dpainting
exited with code 0
I tried:
Making the default Qml Application
Running a few example applications.
I switched between the debug and release modes as well, but all crashed with similar message. Surprisingly 'Animated Tiles example' works fine. Any suggestions ?
Edit:
In debug mode this is what i get:
Debugging starts
&"warning: GDB: Failed to set controlling terminal: Inappropriate ioctl for device\n"
RTTI symbol not found for class 'QGLWidget'
RTTI symbol not found for class 'QGLWidget'
RTTI symbol not found for class 'QGLWidget'
RTTI symbol not found for class 'QGLWidget'
I have same problem on Windows with Qt5. As i understood, in qt5 window subsystem moved into plugins and when application start, QApplication object can't find this libraries.
On windows I step-trace my app into Qt code, and find that plugins try to load from folder ./plugins/system where . is folder with our app binary. Also it was a problem with
dependence. Windows specific plugin dependence from libGLES.dll or libGLES2.dll. But GL libs must place in the same folder as app binary, not with plugins.
Correct file tree on Windows look like this
plugins
system
platform.dll
windows.dll
libGLES.dll
MyApp.exe
Try to look in this way.
Firstly check your graphics driver is installed.
Qt5 or higher version supports OpenGL 3.0 or higher, if your system is old one, i think you need to check the graphics card can support OPENGL verion as i mentioned above.
If above things are fine, then i think you need to install some opengl libraries that can be easily downloadable from Ubuntu.
Regards
Ansif
I would like to write an application for Windows CE. I have already followed all the relevant steps, and started to write the application with Qt Creator.
However, when I started to build the code, there was the following error message:
QtCored4.lib(QtCored4.dll) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'THUMB'
Maybe some more details:
I downloaded the library for Windows CE and I configured Qt-Opensource-Version 4.8.3 with following parameters:
configure -platform win32-msvc2008 -xplatform wince50standard-armv4i-msvc2008
All went well. Qt Creator did recognize the new version and added Windows CE as supported platform.
Now, I guess, that there will be the same problem with QtGuid4.lib. Does anybody know, where I get a compatible file?
The import library for a DLL - the .LIB file - contains machine code stubs that are linked into your program, that call through the import table for the EXE. Therefore, they have to match the processor family that you're compiling for.
You need to obtain the .lib file for the Windows CE ARMv4I build of QtCored4.dll. Try these instructions for building Qt for Windows CE.
I built a qt application that uses opengl on linux and am trying to build it on windows. I used g++ to make it on linux and am using command line nmake for Visual Studio 2005 to build it on windows. When I tryed to build my application I typed
qmake -makefile app.pro
nmake
The nmake failed and said "bool qt_win_owndc_required"... already defined in QtOpenGld.lib ..
one or more multiply definded symbols found
When I tried building one of the examples (hellogl) with opengl it resulted in the same error message. But when I tried building a different example without opengl it worked fine. Do I need to do something special to build the opengl library correctly? Is there something that I am not thinking of?
Are you running qmake in a Visual Studio 2005 Command prompt?
A google search turned up this post: http://www.delta3d.org/forum/viewtopic.php?showtopic=15723
The guy fixed the problem by rebuilding the source.