简体   繁体   中英

Qt 4.8.4 mingw (gcc 4.7) can compile but cannot run

i am new to Qt. i am using Wnndows 8 with MinGW (gcc 4.7.2) i have installed QtLibrary 4.8.4(the official site says Qt 4.84 should work with mingw 4.4) After modified Windows environment variables, i installed Qt Creator 2.6 and setted the kit as well.

now i can compile the example program, but cannot run it, the error message I got is

Starting D:\\usr\\bin\\Qt4\\examples\\opengl\\2dpainting-build-Kit_3_14-Debug\\debug\\2dpainting.exe... The program has unexpectedly finished. D:\\usr\\bin\\Qt4\\examples\\opengl\\2dpainting-build-Kit_3_14-Debug\\debug\\2dpainting.exe exited with code -1073741502

i met the same problem with Qt 5.0.1 + MinGw 4.7.2 too. i guess there is something wrong with "opengl", but don't know how to fix it. please help.

Please try to place all required dlls into the directory where your exe is (see here ). Also make shure; if you are compilung in Debug you need eg. QtCore d 4.dll, but in release QtCore4.dll.

It all about x32 and x64 architectures, If you compile cpp files in x64 mode and then link them with x32 qt the problem will occur. try using the appropriate versions of windows and qt(both x32 or both x64)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM