I'm currenlty working on a portable project. To make it easier to compile on linux and windows, I'd like to use a .pro file which will generate a Makefile on linux and a visual studio project on windows.
But, I'm facing a problem on a very basic example.
Here is my .pro file:
TEMPLATE = app
TARGET = client
CONFIG += debug
SOURCES += src/main.cpp
My main.cpp only contains an empty main:
int main(void) { return 0; }
Then, I just open my visual studio console, cd in my project folder and run qmake.exe -spec win32-msvc2013 -tp vc
.
This generates the expected vcxproj file, that I can open with visual studio.
The program compiles well with visual, but I got a fail during the execution: Qt5Cored.dll missing
.
I've verified:
Additionnal information:
When I manually import the .pro file using the Qt add-in, the vcxproj generated works well (no error during the execution): what's the difference? why the qmake doesn't work, but manual import does? Have I missed something to make the qmake work?
As someone has said in the comments of my question, the solution is pretty simple: I just needed to add the Qt bin path to the Windows PATH environment variable.
Problem solved :)