#include <QtGui/QApplication>
#include <myclass.h>
#include "manidialog.h"
int main(int argc, char *argv[])
{
ManiDialog *w = new ManiDialog( 0 );
MyClass *m = new MyClass();
w->show();
return a.exec();
}
#include <QtGui/QApplication>
#include <myclass.h>
#include "manidialog.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
ManiDialog *w = new ManiDialog( 0 );
MyClass *m = new MyClass();
w->show();
return a.exec();
}
To copy to clipboard, switch view to plain text mode
At line 2 you are asking the pre-processor to look for the file myclass.h in the system include directory path. This path is a compound of a built-in value and any "-I" directives (or equivalents) and typically does not include the current directory. You should be receiving a pre-processor error saying it cannot find myclass.h before you get the error message you are describing here.
Have you tried:
#include "myclass.h"
#include "myclass.h"
To copy to clipboard, switch view to plain text mode
The compiler will look in all the same places for the file but it will look in the current (actually same directory as the cpp file) directory first.
Bookmarks