Solved qmake does not create the Makefile for jom
-
I should mention that my application is 32-bit, the os is Win10-64bit.
The compiler is VS2013.
Qt is 5.8 -
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?
-
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 2What controls this (MD[d] vs. MT[d]) in the .pro file?
-
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? -
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? -
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.