PDA

View Full Version : No .h or .cpp Files Generated



gwb
19th April 2007, 23:34
I created a project and added a dialog and main file but after saving the project and compiling, there were a lot of no such file errors. I noticed that there are no .h or .cpp files named after the dialog. Apparently the uic is supposed to autogenerate these. Does someone have a troubleshooting procedure for this?

Using Mandriva 2007 and Qt 3.3.8 built from source. (It was also behaving like this with the 3.3.6 Mandriva rpm).

Regards,
Gary

jacek
19th April 2007, 23:59
What is the first error you get? Have you set the QTDIR evironment variable?

gwb
20th April 2007, 03:46
Jacek: QTDIR had been set to the old directory (/usr/lib/qt3) and after changing it to the current one (/usr/local/qt) I now have a different set of errors as per below:

main.cpp: In function ‘int main(int, char**)’:
main.cpp:7: error: ‘calcLatLongdialog’ was not declared in this scope
main.cpp:7: error: expected `;' before ‘w’
main.cpp:8: error: ‘w’ was not declared in this scope
make: *** [.obj/main.o] Error 1

jacek
20th April 2007, 11:06
What is the value of name property of the top level widget (in the .ui file)?

gwb
20th April 2007, 17:27
The top level widget name is calcLatLongdialog.

jacek
20th April 2007, 17:34
Could you post main.cpp and .pro file?

gwb
21st April 2007, 16:15
Here they are:

#include <qapplication.h>
#include "NTStoLatLong.h"

int main( int argc, char ** argv )
{
QApplication a( argc, argv );
calcLatLongdialog w;
w.show();
a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
return a.exec();
}



TEMPLATE = app
LANGUAGE = C++

CONFIG += qt warn_on release

SOURCES += main.cpp

FORMS = NTStoLatLong.ui

unix {
UI_DIR = .ui
MOC_DIR = .moc
OBJECTS_DIR = .obj
}

jacek
21st April 2007, 20:26
Everything seems to be OK here.

Are you sure that your widget is called "calcLatLongdialog"? Maybe it's "calcLatLongDialog"?