PDA

View Full Version : Weird errors when compiling project (working on Linux) under Win7 64-bit



sol_kanar
29th November 2013, 13:16
Dear all,

I have a Qt project (Qt 5.0.2) that works well on Unix (Ubuntu 12.04). I am now trying to compile it under Windows (Win7, 64 bit, MinGw, Qt 5.0.2), but I get some weird errors. The project uses some static libraries (.a) and some source files of another project.

Here is the .pro:


TEMPLATE = app

TARGET = ugp3-population-inspector.exe

DEPENDPATH += . \
../../ \
../../Libs/Shared \
../../Libs/Log \
../../Libs/XmlParser \
../../Libs/Graph \
../../Libs/Shared/Exceptions \
../../Libs/Shared \
../../Libs/Log \
../../Libs/XmlParser/ \
../../Libs/Graph \
../../Libs/Constraints \
../../Frontends/ugp3/ \
../../Libs/EvolutionaryCore

INCLUDEPATH += . \
../../ \
../../Libs/Shared \
../../Libs/Log \
../../Libs/XmlParser \
../../Libs/Graph \
../../Libs/Constraints \
../../Frontends/ugp3/ \
../../Libs/EvolutionaryCore

LIBS += -L../../Libs/XmlParser/ \
-L../../Libs/Shared/ \
-L../../Libs/Log/ \
-L../../Libs/Graph/ \
-L../../Libs/Constraints/ \
-L../../Frontends/ugp3/ \
-L../../Libs/EvolutionaryCore/ \
-Wl,--start-group ../../Libs/EvolutionaryCore/libEvolutionaryCore.a ../../Frontends/ugp3/libFrontendCommon.a ../../Libs/Constraints/libConstraints.a ../../Libs/Graph/libGraph.a ../../Libs/XmlParser/libXmlParser.a ../../Libs/Shared/libShared.a ../../Libs/Log/libLog.a -Wl,--end-group

# Input

FORMS += ugp3-population-inspector.ui \
ugp3-entropic-distance.ui


HEADERS = MicroGPApplication.h \
MicroGPEntropicDistanceWindow.h \
MicroGPMainWindow.h

SOURCES = Program.cc \
Program.Run.cc \
MicroGPEntropicDistanceWindow.cpp \
MicroGPMainWindow.cpp \
main.cpp

So, I will show you the errors I got, step-by-step. There are many issues, and this leads me to think that I am missing something important.

When I try to run qmake in the folder with the .pro, the first problem I get is:

WARNING: Failure to find: Program.cc
WARNING: Failure to find: Program.Run.cc
WARNING: Failure to find: Program.cc
WARNING: Failure to find: Program.Run.cc

So, it looks like qmake is not able to find the two files Program.*.cc , that are in the folder "../../Frontends/ugp3" that is added to the DEPENDPATH.

If I put the absolute path of the two files, I get other errors. For example, it appears that qmake is not generating the .h files from the .ui files specified in FORMS:


fatal error: ui_ugp3-entropic-distance.h: No such file or directory

I proceeded to manually create the two .h files, using uic:


uic ugp3-population-inspector.ui -o ui_ugp3-population-inspector.h
uic ugp3-entropic-distance.ui -o ui_ugp3-entropic-distance.h

So, the next error I get is:

fatal error: QFileDialog: No such file or directory

So, I guess there is something wrong from the start. Can you help me?

Thanks in advance :-D

sol_kanar
1st December 2013, 20:27
Just to wrap things up, I managed to solve the problem by installing Qt 5.1.1 along with mingw 4.8, and re-compiling everything with mingw 4.8

Now I have another issue :-P but I think it deserves a second thread, since it's completely different.