Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Apllication Crashs on Windows. Code Error:
Forum Updated to NodeBB v4.3 + New Features

Apllication Crashs on Windows. Code Error:

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dcbasso
    wrote on last edited by
    #1

    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)
    #else
    extern "C"
    int APIENTRY WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR /cmdParamarg/, int cmdShow)
    #endif
    {
    //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());
    #endif
    @

    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!!!!

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dcbasso
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        • L Offline
          L Offline
          lgeyer
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dcbasso
            wrote on last edited by
            #5

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

            I will try... thanks

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dcbasso
              wrote on last edited by
              #6

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

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved