Results 1 to 8 of 8

Thread: No .h or .cpp Files Generated

  1. #1
    Join Date
    Apr 2007
    Posts
    4
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default No .h or .cpp Files Generated

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: No .h or .cpp Files Generated

    What is the first error you get? Have you set the QTDIR evironment variable?

  3. #3
    Join Date
    Apr 2007
    Posts
    4
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: No .h or .cpp Files Generated

    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

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: No .h or .cpp Files Generated

    What is the value of name property of the top level widget (in the .ui file)?

  5. #5
    Join Date
    Apr 2007
    Posts
    4
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: No .h or .cpp Files Generated

    The top level widget name is calcLatLongdialog.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: No .h or .cpp Files Generated

    Could you post main.cpp and .pro file?

  7. #7
    Join Date
    Apr 2007
    Posts
    4
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: No .h or .cpp Files Generated

    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
    }

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: No .h or .cpp Files Generated

    Everything seems to be OK here.

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

Similar Threads

  1. Problem converting .ui files from Qt3 to 4
    By Amanda in forum Qt Programming
    Replies: 6
    Last Post: 28th October 2006, 04:34
  2. Replies: 5
    Last Post: 22nd September 2006, 08:04
  3. [Win32/VC++ 8.0] Strange problems with qrc_*.cpp files
    By mloskot in forum Installation and Deployment
    Replies: 6
    Last Post: 6th March 2006, 10:28
  4. uic not creating seperate .h and .cpp files
    By Kapil in forum Qt Programming
    Replies: 2
    Last Post: 13th February 2006, 10:43
  5. Visual Studio 2003 and .vcproj files
    By mbjerkne in forum General Discussion
    Replies: 2
    Last Post: 1st February 2006, 00:51

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.