Nominate our 2022 Qt Champions!

qmake does not create the Makefile for jom

  • QtCreator does not work for me under Windows, using VS2013 compiler.
    When trying to build, I get:

    win32-msvc2013 "CONFIG+=debug" "CONFIG+=qml_debug"
    19:14:11: The process "C:\Qt\5.8\msvc2013\bin\qmake.exe" exited normally.
    19:14:11: Starting: "C:\Qt\Tools\QtCreator\bin\jom.exe" qmake_all
    Error: File Makefile doesn't exist.
    19:14:11: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
    Error while building/deploying project PAMS-Camera (kit: Desktop Qt 5.8.0 MSVC2013 32bit)
    When executing step "qmake"
    19:14:11: Elapsed time: 00:01.

    What am I doing wrong?

  • I found that this error does not happen if I use "app" instead of "vcapp", but if I use "app" I get lots of errors later in the Qt source code.

    I have the following platform switches in my .pro file:

    win32: TEMPLATE = vcapp (or app)
    macx: TEMPLATE = app
    linux: TEMPLATE = app

    Are these switches correct?

  • Lifetime Qt Champion


    AFAIK, vcapp is for generating a project template to use directly in Visual Studio.

    So, simply use app for all platforms.

    What errors are you getting on Windows when building your application ?

  • Example:

    22:07:39: Starting: "C:\Qt\Tools\QtCreator\bin\jom.exe" clean
    C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug clean
    del debug\qrc_USBCamera.cpp
    Could Not Find C:\Users\bnilsson\Documents\QtCreator\build-PAMS-Camera-Desktop_Qt_5_8_0_MSVC2013_32bit-Debug\debug\qrc_USBCamera.cpp

    and further on:

    rc -D_DEBUG -D_TTY_WIN_ -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_QML_DEBUG -fo debug\USBCamera.res ..\PAMS-uEye-Camera310b\resources\USBCamera.rc

    Microsoft (R) Windows (R) Resource Compiler Version 6.3.9600.16384

    Copyright (C) Microsoft Corporation. All rights reserved.

    C:\Qt\5.8\msvc2013\include\QtCore/qnamespace.h(53) : error C2143: syntax error : missing '{' before '*'
    C:\Qt\5.8\msvc2013\include\QtCore/qnamespace.h(68) : error C2061: syntax error : identifier 'Qt'
    C:\Qt\5.8\msvc2013\include\QtCore/qnamespace.h(68) : error C2059: syntax error : ';'
    C:\Qt\5.8\msvc2013\include\QtCore/qnamespace.h(68) : error C2449: found '{' at file scope (missing function header?)
    C:\Qt\5.8\msvc2013\include\QtCore/qnamespace.h(1745) : error C2059: syntax error : '}'
    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cstddef(18) : error C2054: expected '(' to follow 'using'
    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cstddef(18) : error C2061: syntax error : identifier 'using'
    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\initializer_list(15) : error C2143: syntax error : missing '{' before '<'
    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\initializer_list(15) : error C2059: syntax error : '<'

    Pretty fundamental stuff.

  • Lifetime Qt Champion

    Can you show your complete .pro file ?

  • Sure.

    The linux and MacX versions compiles fine.

    QT	+= core gui widgets
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    TARGET  = PAMS-Camera
    win32:  TEMPLATE = app
    macx:   TEMPLATE = app
    linux:  TEMPLATE = app
    CONFIG 	+= debug_and_release qt thread
    DEPENDPATH += . src ui
    INCLUDEPATH += . src ui
    macx {
    	MOC_DIR = GeneratedFiles/MacX
    	ICON = resources/USBCamera.icns
    linux {
            MOC_DIR = GeneratedFiles/Linux
    #        DEFINES	= _TTY_POSIX_
            DEFINES += __LINUX__
            LIBS += -lueye_api
            ICON = resources/USBCamera.icns
    win32 {
    	MOC_DIR = GeneratedFiles/Win32
    	INCLUDEPATH += "C:/Program Files/IDS/uEye/Develop/include"
    	QMAKE_LIBDIR += "C:/Program Files/IDS/uEye/Develop/Lib"
    	LIBS += -luEye_api -luEye_tools -lVersion
    	ICON = resources/USBCamera.ico
    RESOURCES	= resources/USBCamera.qrc
    RC_FILE	= resources/USBCamera.rc
    SOURCES	= src/main.cpp \
    		  src/about.cpp \
    		  src/MyCameraApp.cpp \
    		  src/MyCameraWindow.cpp \
    HEADERS	= src/MyCameraApp.h \
    		  src/about.h \
    		  src/MyCameraWindow.h \
                      src/ApplicationInfo.h \
    UI_DIR	= ui
    FORMS	= ui/videowindow.ui \
    		  ui/about.ui \

  • I should mention that my application is 32-bit, the os is Win10-64bit.
    The compiler is VS2013.
    Qt is 5.8

  • Lifetime Qt Champion

    You shouldn't modify QMAKE_LIBDIR, use the LIBS.

    Also, since you have spaces in your path, take a look at shell quote.

  • Sorry about all these snippets...

    I should also mention that I have previously used VS2013 to build the project using 'qmake -t vcapp'. Now I got the idea it would be easier to maintain a cross platform project by using the same IDE on all three platfoms, i.e. QtCreator. So now I have used Win10 QtCreator with the same .pro file as I used to make the vcapp project. Maybe there are some leftovers from the VS history in my file structure that messes it up?

  • Lifetime Qt Champion

    You should remove the XXX_DIR lines you have. By default, Qt Creator uses shadow build so your sources stay clean from build artefacts.

  • Not sure I understand what 'XXX_DIR' means. Could you please elaborate?

  • Significant progress here after removing QMAKE_LIBDIR.
    Now I got rid of the error masses, instead I got this:

    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\INCLUDE\afx.h(24) : fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
    jom: C:\Users\bnilsson\Documents\QtCreator\build-PAMS-Camera-Desktop_Qt_5_8_0_MSVC2013_32bit-Debug\Makefile.Debug [debug\main.obj] Error 2

    What controls this (MD[d] vs. MT[d]) in the .pro file?

  • Lifetime Qt Champion

    This defines where your application/library use the dynamic Windows run-time or the static one. Qt uses the dynamic run time.

  • So what can I do about this MD/MT error in the pro file?
    Or should I change something in my sources?

  • Lifetime Qt Champion

    I'd try adding DEFINES += _AFXDLL to the Windows specific part of the .pro file.

  • Ok, another improvement, thanks.

    Now it says

    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\INCLUDE\afxv_w32.h(16) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>

    and I cannot see that I do this anywhere.

    Is really MFC the default for VS2013 and Qt?
    Can it be controlled in some options settings?

  • Lifetime Qt Champion

    No, Qt does not use any of MFC (except for the module provided to help transition your application from MFC to Qt). However your dependencies might be.

  • Can I tell the VS2013 compiler not to use MFC?

  • My latest question about VS2013 and MFC is not applicable, since I have other QtCreator projects that actually compiles and runs properly. So there is probably nothing wrong or strange with my VS2013 compiler installation.
    My plan now is to give up and rebuild this project gradually to see where the problem really lies.

    Thanks SGaist for all the useful suggestions and support. I am a little wiser now than I was before.

  • I have now found my problem.
    I had two files, with the same name but with different extensions, one .c and one .cpp.
    Only the .cpp file was "mentioned" in the .pro file, but they both were included in the Build. After removal of the .c file, everything became less confusing, and the remaining problems could be isolated to my own source files.
    Finally, it compiles and runs now.

    Again, thanks for the assistance.

Log in to reply