Important: Please read the Qt Code of Conduct -

Apllication Crashs on Windows. Code Error:

  • When I try to start my application on Windows, I get a error message with co error "c0000005"
    The same project, application on Linux works very very fine!

    #ifdef Q_OS_WINCE
    int WINAPI WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPWSTR /wCmdParam/, int cmdShow)
    extern "C"
    int APIENTRY WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR /cmdParamarg/, int cmdShow)
    //Error on this line (Below)
    QByteArray cmdParam = QString::fromWCharArray(GetCommandLine()).toLocal8Bit(); //--> HERE IS THE ERROR!

    #if defined(Q_OS_WINCE)
    wchar_t appName[MAX_PATH];
    GetModuleFileName(0, appName, MAX_PATH);
    cmdParam.prepend(QString(QLatin1String(""%1" ")).arg(QString::fromWCharArray(appName)).toLocal8Bit());

    Well First of all I don't create this code, is something form Qt!
    I'm compiling using the last MinGW, the Qt 4.8.3 on Windows 7 32bits.
    I don't know how to solve my problem!!!!

  • MinGW 4.4 (used to build the prebuilt libraries) and MinGW 4.7 are not binary compatible.

    If you want to use Qt with any other version of MinGW than 4.4 you will have to re-build the Qt libraries.

  • I'm using MinGW 4.7.2.
    A 2hours and half ago I start a Batch file called "Qt 4.8.3 (Build Debug Libraries)", is that right?
    And how to build an realease libraries?

  • Download or clone the sources and then <code>configure -platform win32-g++-4.6</code> and <code>mingw32-make</code>.

  • To make a working app need to do a lot of stuff...
    need to know some advanced things...

    I will try... thanks

  • If I install the MinGW 4.4 I will not need to compile all libs?!

Log in to reply