Page 1 of 2 12 LastLast
Results 1 to 20 of 23

Thread: error compile

  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default error compile

    Hi, I have this error; my command is: nmake clean; qmake; nmake (the last get this error)
    NMAKE : fatal error U1071: cycle in dependency tree for target 'ui\mainform.h'
    Stop.
    What happen?
    Regards

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: error compile

    Could we see the project file?

  3. #3
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: error compile

    Qt Code:
    1. SOURCES += main.cpp \
    2. widget.cpp \
    3. plainit.cpp
    4.  
    5. HEADERS += widget.h \
    6. plainit.h
    7.  
    8. DISTFILES += program.txt
    9. message( "version 0.5" )
    10. DESTDIR = .
    11.  
    12.  
    13. unix {
    14. UI_DIR = .ui
    15. MOC_DIR = .moc
    16. OBJECTS_DIR = .obj
    17. }
    18. win32 {
    19. UI_DIR = ui
    20. MOC_DIR = moc
    21. OBJECTS_DIR = obj
    22. thread {
    23. DEFINES += QT_THREAD_SUPPORT
    24. }
    25. }
    26.  
    27.  
    28. # Input
    29.  
    30. FORMS = aboutform.ui \
    31. initplaindialog.ui \
    32. mainform.ui \
    33. optiondialog.ui
    34. IMAGES = images/4view.png \
    35. images/widgetstack.png \
    36. images/wireFrame.png \
    37. images/grid1.png \
    38. images/light0.png \
    39. images/hole.png \
    40. images/ice.png
    41.  
    42. TEMPLATE =app
    43. CONFIG += qt opengl console
    44. INCLUDEPATH += .. C:\code\glew\include
    45. win32:LIBS += C:\code\glew\lib\glew32.lib
    46. LANGUAGE = C++
    To copy to clipboard, switch view to plain text mode 
    It worked! I deleted some icon, label .....from qtDesigner and now don't compile
    Regards

  4. #4
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: error compile

    Quote Originally Posted by mickey
    NMAKE : fatal error U1071: cycle in dependency tree for target 'ui\mainform.h'
    Stop.
    Delete your old Makefile and then qmake to generate a new one.

  5. #5
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: error compile

    Everytime I do: nmake clean; qmake; nmake. But problem persist..
    Regards

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: error compile

    Quote Originally Posted by mickey
    Everytime I do: nmake clean; qmake; nmake. But problem persist..
    "clean" does not remove the Makefile.

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: error compile

    Could you post your mainwindow.ui file? As attachment please

  8. #8
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: error compile

    I have delete makefile; it's the same
    yes here mainform.ui file...thanks
    Attached Files Attached Files
    Regards

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: error compile

    You are including the .ui file into that same .ui file? Why so?

  10. #10
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: error compile

    I don't to do this; from designer (in implementation) there isn't mainform.ui.h; in mainform.h the same....I see now that I have 2 <optiondiaog.h> in mainform. h.
    What is happen? How change it? I edit mainform.ui.h and delete the line?
    thanks
    Regards

  11. #11
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: error compile

    HI, I tried to delete the line in mainform.ui.h (now there isn't). But problem don't change...
    I think the problem is inside myToolbox: I have enable/disable it form qtDesigner but I see that some object inside it (label, spinbox...) aren't going enable! And from qt designer I can't enable object inside myToolbox. How can do?
    Last edited by mickey; 27th February 2006 at 16:34.
    Regards

  12. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: error compile

    Quote Originally Posted by mickey
    I don't to do this;
    If you open that .ui file in a text editor, you'll see (near the end of the file) a line telling that you do.

  13. #13
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: error compile

    yes see. But designer has add this line. I have an older version of mainform.ui that has the same line
    Qt Code:
    1. <include location="local" impldecl="in implementation">mainform.ui.h</include>
    To copy to clipboard, switch view to plain text mode 
    but this compile successfully....
    I don't understand....
    Regards

  14. #14
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: error compile

    Ah... ok, I missed that ".h" at the end of the entry. Where do you include mainwindow.h? Could you find all occurences?

  15. The following user says thank you to wysota for this useful post:

    mickey (27th February 2006)

  16. #15
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: error compile

    I have an old version of my mainform.ui and substituting it, compile! the problem seems inside this file....but this copy is very older.....
    Regards

  17. #16
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: error compile

    Sorry but I am still stop.....Any other suggests?
    Regards

  18. #17
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Thumbs up Re: error compile [SOLVED]

    Hi,
    I change including <mywidget.h> from declaration to implementation (in qtDesigner) and now compile. But Why?
    Thanks
    Last edited by mickey; 1st March 2006 at 00:46.
    Regards

  19. #18
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: error compile

    And what is mywidget.h? Could we see its contents? Are you by any chance including mainwindow.h there?

  20. #19
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: error compile

    Qt Code:
    1. ifndef MYWIDGET_H
    2. #define MYWIDGET_H
    3. #include <qgl.h>
    4. #include <qpoint.h>
    5. #include <qtimer.h>
    6. #include "mainform.h"
    7. class MainForm;
    8. #define BUFSIZE 512
    9.  
    10. class MyWidget : public QGLWidget
    11. {
    12. Q_OBJECT
    13. public:
    14.  
    15. MyWidget( QWidget *parent = 0, const char *name = 0, const QGLWidget* shareWidget = 0);
    16. ~MyWidget();
    17. .........
    18. };
    To copy to clipboard, switch view to plain text mode 

    Is it #include "mainform.h" the problems? I need take it here... But wich is different between include in implem and in declaration? I thought it was the same for success of compile...
    Regards

  21. #20
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: error compile

    Quote Originally Posted by mickey
    Is it #include "mainform.h" the problems?
    Probably yes.

    I need take it here...
    No you don't. Do you use methods defined there?
    But wich is different between include in implem and in declaration? I thought it was the same for success of compile...
    No. You should avoid including to much files in headers, because it slows down the compilation. But the reason of failure might be that qmake sees that it needs that included file in the current file, but that file is included in the other one, so it depends on it and thus it creates a cycle. Of course it might be something different, but you should try removing that include from the header file.

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.