PDA

View Full Version : QMainWindow: No such file or directory



JPNaude
4th February 2009, 09:00
Hi there

I'm running into a very strange, or very simple problem. I have a few files in a .pro file that gets compiled into a dll. A couple of these files (MainWindow.h/cpp) does not seem to find any dependencies.

Thiis is the important parts of my .pro file


TEMPLATE = lib
CONFIG += qt gui
DEPENDPATH += . source ../../include ../../source ../../../Framework/Headers/Interfaces ../../../Framework/Headers/Common
INCLUDEPATH += . source ../../include ../../source ../../../Framework/Headers/Interfaces ../../../Framework/Headers/Common

DEFINES += VCL_MAKE_DLL2

# Input
HEADERS += source/AboutBox.h \
source/MainWindow.h \
source/MainWindowComponent.h \
source/SplashScreen.h

FORMS += source/AboutBox.ui

SOURCES += source/AboutBox.cpp \
source/MainWindow.cpp \
source/MainWindowComponent.cpp

RESOURCES += MainWindow.qrc



Now what I can't understand is that AboutBox compiles fine and it finds the Qt Gui library without any problems. The top of the MainWindow and AboutBox headers are shown below:



#ifndef MAIN_WINDOW_H
#define MAIN_WINDOW_H

#include <QMainWindow>




#ifndef ABOUT_BOX_H
#define ABOUT_BOX_H

#include <GCF/Common.h>
#include <QDialog>



Can someone please help me understand how this is possible...
Thanks
Jaco

ktk
4th February 2009, 22:56
The line "CONFIG += qt gui" looks fishy. Why is it there?

JPNaude
5th February 2009, 10:06
I added it because it complained about not finding any Qt related classes, hoping that it would fix it.

jpn
5th February 2009, 10:54
What does the compiler command look like?