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. [SOLVED] QT compling - error 740
QtWS25 Last Chance

[SOLVED] QT compling - error 740

Scheduled Pinned Locked Moved General and Desktop
compilecompiling qt
5 Posts 2 Posters 3.6k Views
  • 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.
  • U Offline
    U Offline
    uruloke
    wrote on last edited by uruloke
    #1

    Hello,

    I am having trouble with a fresh install of QT Creator, this is my first time using it.
    When I press compile I get this error:

    03:49:39: Running steps for project calendar...
    03:49:39: Starting: "D:\Program Files\QT\5.5\mingw492_32\bin\qmake.exe" "D:\Program Files\QT\Examples\Qt-5.5\quick\controls\calendar\calendar.pro" -r -spec win32-g++ "CONFIG+=debug" "CONFIG+=declarative_debug" "CONFIG+=qml_debug"
    03:49:39: The process "D:\Program Files\QT\5.5\mingw492_32\bin\qmake.exe" exited normally.
    03:49:39: Starting: "D:\Program Files\QT\Tools\mingw492_32\bin\mingw32-make.exe" 
    D:/Program Files/QT/Tools/mingw492_32/bin/mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory 'D:/Program Files/QT/Examples/Qt-5.5/quick/controls/build-calendar-Desktop_Qt_5_5_0_MinGW_32bit-Debug'
    process_begin: CreateProcess(NULL, D:/Program Files/Git/bin/sh.exe -c "g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../calendar -I. -I../shared -I\"D:/Program Files/QT/5.5/mingw492_32/include\" -I\"D:/Program Files/QT/5.5/mingw492_32/include/QtQuick\" -I\"D:/Program Files/QT/5.5/mingw492_32/include/QtWidgets\" -I\"D:/Program Files/QT/5.5/mingw492_32/include/QtGui\" -I\"D:/Program Files/QT/5.5/mingw492_32/include/QtANGLE\" -I\"D:/Program Files/QT/5.5/mingw492_32/include/QtQml\" -I\"D:/Program Files/QT/5.5/mingw492_32/include/QtNetwork\" -I\"D:/Program Files/QT/5.5/mingw492_32/include/QtSql\" -I\"D:/Program Files/QT/5.5/mingw492_32/include/QtCore\" -Idebug -I\"D:/Program Files/QT/5.5/mingw492_32/mkspecs/win32-g++\"  -o debug/event.o ../calendar/src/event.cpp", ...) failed.
    make (e=740): The requested operation requires elevation.
    
    mingw32-make[1]: *** [debug/event.o] Error 740
    g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../calendar -I. -I../shared -I"D:/Program Files/QT/5.5/mingw492_32/include" -I"D:/Program Files/QT/5.5/mingw492_32/include/QtQuick" -I"D:/Program Files/QT/5.5/mingw492_32/include/QtWidgets" -I"D:/Program Files/QT/5.5/mingw492_32/include/QtGui" -I"D:/Program Files/QT/5.5/mingw492_32/include/QtANGLE" -I"D:/Program Files/QT/5.5/mingw492_32/include/QtQml" -I"D:/Program Files/QT/5.5/mingw492_32/include/QtNetwork" -I"D:/Program Files/QT/5.5/mingw492_32/include/QtSql" -I"D:/Program Files/QT/5.5/mingw492_32/include/QtCore" -Idebug -I"D:/Program Files/QT/5.5/mingw492_32/mkspecs/win32-g++"  -o debug/event.o ../calendar/src/event.cpp
    Makefile.Debug:343: recipe for target 'debug/event.o' failed
    mingw32-make[1]: Leaving directory 'D:/Program Files/QT/Examples/Qt-5.5/quick/controls/build-calendar-Desktop_Qt_5_5_0_MinGW_32bit-Debug'
    makefile:34: recipe for target 'debug' failed
    mingw32-make: *** [debug] Error 2
    03:49:39: The process "D:\Program Files\QT\Tools\mingw492_32\bin\mingw32-make.exe" exited with code 2.
    Error while building/deploying project calendar (kit: Desktop Qt 5.5.0 MinGW 32bit)
    When executing step "Make"
    03:49:39: Elapsed time: 00:01.
    

    I am running an example code from an calendar with no changes made to it at all, but it doesn't look like it's an error in the code.

    Does anyone know how to fix this problem?

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by JKSH
      #2

      Hi,

      @uruloke said:

      CreateProcess(NULL, D:/Program Files/Git/bin/sh.exe -c "g++ ...")

      mingw32-make detected sh.exe in your PATH, and now it wants to use sh.exe instead of cmd.exe. Windows doesn't allow that.

      Remove D:\Program Files\Git\bin from your PATH.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      U 1 Reply Last reply
      0
      • JKSHJ JKSH

        Hi,

        @uruloke said:

        CreateProcess(NULL, D:/Program Files/Git/bin/sh.exe -c "g++ ...")

        mingw32-make detected sh.exe in your PATH, and now it wants to use sh.exe instead of cmd.exe. Windows doesn't allow that.

        Remove D:\Program Files\Git\bin from your PATH.

        U Offline
        U Offline
        uruloke
        wrote on last edited by uruloke
        #3

        @JKSH

        Thank you, it worked to remove Git from my PATH. Now I just have to configure Git manually in all my other applications that uses Git.

        1 Reply Last reply
        0
        • JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by JKSH
          #4

          Hi @uruloke, I'm assuming you installed Git from https://msysgit.github.io/? If so, you could still have Git in your PATH by adding D:\Program Files\Git\cmd to your PATH. Don't add D:\Program Files\Git\bin.

          And next time you install Git, select "Use Git from the Windows Command Prompt". Don't select "Use Git and optional Unix tools from the Windows Command Prompt" -- this option causes problems like your error 740 (notice the big red warning for this option)

          Git PATH options

          Another option is to use Visual Studio instead of MinGW. Visual Studio doesn't have problems with sh.exe.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          U 1 Reply Last reply
          2
          • JKSHJ JKSH

            Hi @uruloke, I'm assuming you installed Git from https://msysgit.github.io/? If so, you could still have Git in your PATH by adding D:\Program Files\Git\cmd to your PATH. Don't add D:\Program Files\Git\bin.

            And next time you install Git, select "Use Git from the Windows Command Prompt". Don't select "Use Git and optional Unix tools from the Windows Command Prompt" -- this option causes problems like your error 740 (notice the big red warning for this option)

            Git PATH options

            Another option is to use Visual Studio instead of MinGW. Visual Studio doesn't have problems with sh.exe.

            U Offline
            U Offline
            uruloke
            wrote on last edited by
            #5

            @JKSH
            Thank you for clarifying what's causing the error.
            I will work around this then, so I can set it up accordingly to how I wanna use it.

            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