문제

I've got some issues with wrong Qt, wrong MinGW, wrong QtCore4.dll path while building Cppcheck GUI, but finally made it into an executable, which simply crashes at run.

Disassembly for problematic spot looks like this:

 mov         eax,12Fh  
 xor         ecx,ecx  
 lea         edx,[esp+4]  
 call        dword ptr fs:[0C0h]  
 add         esp,4  
 ret         0Ch  

Seems like it crashes in attempt to call something statically linked. One more thing which seems strange to me: the executable is about 30 Mb versus 500 Kb in the release I installed from downloaded .msi. It just has to be built wrong.

I use latest sources from Github, Qt 4.8.5 (mingw version), though I took the MinGW itself from Qt 5.1.1. and the whole thing is going on in Windows if it matters. I just run "build.bat all debug" - and that's it. So, what am I doing wrong this time?

도움이 되었습니까?

해결책

The official Qt 4.8.5 was built using GCC 4.4. The downloads page lists it as "Qt libraries 4.8.5 for Windows (minGW 4.4, 317 MB)". However, the MinGW provided with Qt 5.1.1 contains GCC 4.8, which is incompatible with libraries built with GCC 4.4. The symptoms of GCC version mismatches are weird crashes, like what you're seeing.

Your options (from easiest to hardest) are:

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top