Results 1 to 8 of 8

Thread: Project compile problems

  1. #1
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Project compile problems

    I try to compile my project and I get following errors:
    Qt Code:
    1. Running build steps for project PresernMkI...
    2. Starting: C:/Qt/2009.04/mingw/bin/mingw32-make.exe clean -w
    3. mingw32-make: Entering directory `C:/Users/Uporabnik/Desktop/PresernMkI/trunk'
    4. C:/Qt/2009.04/mingw/bin/mingw32-make -f Makefile.Debug clean
    5. mingw32-make[1]: Entering directory `C:/Users/Uporabnik/Desktop/PresernMkI/trunk'
    6. del debug\moc_mainwindow.cpp debug\moc_stopwatchwidget.cpp debug\moc_clocklcdwidget.cpp debug\moc_stopwatchwidgetarea.cpp
    7. del debug\main.o debug\mainwindow.o debug\centralwidget.o debug\stopwatchwidget.o debug\clocklcdwidget.o debug\stopwatchwidgetarea.o debug\moc_mainwindow.o debug\moc_stopwatchwidget.o debug\moc_clocklcdwidget.o debug\moc_stopwatchwidgetarea.o
    8. Could Not Find C:\Users\Uporabnik\Desktop\PresernMkI\trunk\debug\moc_mainwindow.cpp
    9. mingw32-make[1]: Leaving directory `C:/Users/Uporabnik/Desktop/PresernMkI/trunk'
    10. C:/Qt/2009.04/mingw/bin/mingw32-make -f Makefile.Release clean
    11. mingw32-make[1]: Entering directory `C:/Users/Uporabnik/Desktop/PresernMkI/trunk'
    12. del release\moc_mainwindow.cpp release\moc_stopwatchwidget.cpp release\moc_clocklcdwidget.cpp release\moc_stopwatchwidgetarea.cpp
    13. del release\main.o release\mainwindow.o release\centralwidget.o release\stopwatchwidget.o release\clocklcdwidget.o release\stopwatchwidgetarea.o release\moc_mainwindow.o release\moc_stopwatchwidget.o release\moc_clocklcdwidget.o release\moc_stopwatchwidgetarea.o
    14. mingw32-make[1]: Leaving directory `C:/Users/Uporabnik/Desktop/PresernMkI/trunk'
    15. mingw32-make: Leaving directory `C:/Users/Uporabnik/Desktop/PresernMkI/trunk'
    16. Could Not Find C:\Users\Uporabnik\Desktop\PresernMkI\trunk\release\moc_mainwindow.cpp
    17. Could Not Find C:\Users\Uporabnik\Desktop\PresernMkI\trunk\release\main.o
    18. Exited with code 0.
    19. Starting: C:/Qt/2009.04/qt/bin/qmake.exe C:/Users/Uporabnik/Desktop/PresernMkI/trunk/PresernMkI.pro -spec win32-g++ -r
    20. Exited with code 0.
    21. Starting: C:/Qt/2009.04/mingw/bin/mingw32-make.exe -w
    22. mingw32-make: Entering directory `C:/Users/Uporabnik/Desktop/PresernMkI/trunk'
    23. C:/Qt/2009.04/mingw/bin/mingw32-make -f Makefile.Debug
    24. mingw32-make[1]: Entering directory `C:/Users/Uporabnik/Desktop/PresernMkI/trunk'
    25. g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\Qt\2009.04\qt\include\QtCore" -I"c:\Qt\2009.04\qt\include\QtGui" -I"c:\Qt\2009.04\qt\include" -I"includes" -I"c:\qwt\src" -I"includes\StopWatchWidget" -I"c:\Qt\2009.04\qt\include\ActiveQt" -I"debug" -I"c:\Qt\2009.04\qt\mkspecs\win32-g++" -o debug\main.o src\main.cpp
    26. g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\Qt\2009.04\qt\include\QtCore" -I"c:\Qt\2009.04\qt\include\QtGui" -I"c:\Qt\2009.04\qt\include" -I"includes" -I"c:\qwt\src" -I"includes\StopWatchWidget" -I"c:\Qt\2009.04\qt\include\ActiveQt" -I"debug" -I"c:\Qt\2009.04\qt\mkspecs\win32-g++" -o debug\mainwindow.o src\mainwindow.cpp
    27. g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\Qt\2009.04\qt\include\QtCore" -I"c:\Qt\2009.04\qt\include\QtGui" -I"c:\Qt\2009.04\qt\include" -I"includes" -I"c:\qwt\src" -I"includes\StopWatchWidget" -I"c:\Qt\2009.04\qt\include\ActiveQt" -I"debug" -I"c:\Qt\2009.04\qt\mkspecs\win32-g++" -o debug\centralwidget.o src\centralwidget.cpp
    28. g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\Qt\2009.04\qt\include\QtCore" -I"c:\Qt\2009.04\qt\include\QtGui" -I"c:\Qt\2009.04\qt\include" -I"includes" -I"c:\qwt\src" -I"includes\StopWatchWidget" -I"c:\Qt\2009.04\qt\include\ActiveQt" -I"debug" -I"c:\Qt\2009.04\qt\mkspecs\win32-g++" -o debug\stopwatchwidget.o src\StopWatchWidget\stopwatchwidget.cpp
    29. src\StopWatchWidget\stopwatchwidget.cpp: In constructor `StopWatchWidget::StopWatchWidget(const QString&, QWidget*, Qt::WindowFlags, const quint64&)':
    30. src\StopWatchWidget\stopwatchwidget.cpp:7: error: class `StopWatchWidget' does not have any field named `QDockWidget'
    31. src\StopWatchWidget\stopwatchwidget.cpp:9: error: `setCurrentSecs' was not declared in this scope
    32. src\StopWatchWidget\stopwatchwidget.cpp:11: error: `m_pWidgetArea' was not declared in this scope
    33. src\StopWatchWidget\stopwatchwidget.cpp:11: error: `createWidgetArea' was not declared in this scope
    34. src\StopWatchWidget\stopwatchwidget.cpp:27: error: 'class StopWatchWidget' has no member named 'setFloating'
    35. src\StopWatchWidget\stopwatchwidget.cpp:28: error: 'class StopWatchWidget' has no member named 'setFeatures'
    36. src\StopWatchWidget\stopwatchwidget.cpp:28: error: `QDockWidget' has not been declared
    37. src\StopWatchWidget\stopwatchwidget.cpp:28: error: `NoDockWidgetFeatures' was not declared in this scope
    38. src\StopWatchWidget\stopwatchwidget.cpp:29: error: 'class StopWatchWidget' has no member named 'setAllowedAreas'
    39. src\StopWatchWidget\stopwatchwidget.cpp:31: error: 'class StopWatchWidget' has no member named 'setWidget'
    40. src\StopWatchWidget\stopwatchwidget.cpp:31: error: `stopWatchWidgetArea' was not declared in this scope
    41. src\StopWatchWidget\stopwatchwidget.cpp:9: warning: unused variable 'setCurrentSecs'
    42. src\StopWatchWidget\stopwatchwidget.cpp:11: warning: unused variable 'm_pWidgetArea'
    43. src\StopWatchWidget\stopwatchwidget.cpp:11: warning: unused variable 'createWidgetArea'
    44. src\StopWatchWidget\stopwatchwidget.cpp:28: warning: unused variable 'NoDockWidgetFeatures'
    45. src\StopWatchWidget\stopwatchwidget.cpp:31: warning: unused variable 'stopWatchWidgetArea'
    46. src\StopWatchWidget\stopwatchwidget.cpp: At global scope:
    47. src\StopWatchWidget\stopwatchwidget.cpp:45: error: expected constructor, destructor, or type conversion before '*' token
    48. mingw32-make[1]: Leaving directory `C:/Users/Uporabnik/Desktop/PresernMkI/trunk'
    49. mingw32-make: Leaving directory `C:/Users/Uporabnik/Desktop/PresernMkI/trunk'
    50. mingw32-make[1]: *** [debug/stopwatchwidget.o] Error 1
    51. mingw32-make: *** [debug] Error 2
    52. Exited with code 2.
    53. Error while building project PresernMkI
    54. When executing build step 'Make'
    To copy to clipboard, switch view to plain text mode 
    What am I doing wrong, since I did NOT change sources since last succsesfull compilation (with qt 4.5.2, before installing 4.5.3)?

    Sincerely,
    Marko
    Qt 5.3 Opensource & Creator 3.1.2

  2. #2
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Project compile problems

    Looking at your compiler's output: there is a bug (probably a missing #include) at line 45 of file src\StopWatchWidget\stopwatchwidget.cpp

  3. #3
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Project compile problems

    Well, I've checked that, I have all needed includes. Here is header file:
    Qt Code:
    1. #ifndef STOPWATCHWIDGET_H #define STOPWATCHWIDGET_H
    2. // system includes
    3. #include <QtGui/QDockWidget>
    4. // custom includes
    5. //#include "ClockLCDWidget.h"
    6. #include "StopWatchWidgetArea.h"
    7. class StopWatchWidget : public QDockWidget
    8. {
    9. Q_OBJECT
    10. private:
    11. // ClockLCDWidget* m_pLCDWidget;
    12. quint64 m_iCurrentSecs;
    13. StopWatchWidgetArea* m_pWidgetArea;
    14. StopWatchWidgetArea* createWidgetArea(); // creates widget area
    15. // ClockLCDWidget* createLCDWidget(void);
    16. public:
    17. StopWatchWidget(const QString& strTitle=QString(tr("")),
    18. QWidget* pParent=0,
    19. Qt::WindowFlags flags=0,
    20. const quint64& iStartingSecs=60);
    21. // getter methods
    22. /*
    23.   inline QSize sizeHint() const
    24.   { return QSize(250, 120); }
    25.  */
    26. /*
    27.   inline ClockLCDWidget* lcdWidget(void) const
    28.   { return m_pLCDWidget; }
    29.  */
    30. inline quint64 currentSecs() const
    31. { return m_iCurrentSecs; }
    32. inline StopWatchWidgetArea* stopWatchWidgetArea() const
    33. { return m_pWidgetArea; }
    34. // setter methods
    35. inline void setCurrentSecs(const quint64& iSecs)
    36. { m_iCurrentSecs=iSecs; }
    37. };
    38. #endif // STOPWATCHWIDGET_H
    To copy to clipboard, switch view to plain text mode 
    and here is it's .cpp file:
    Qt Code:
    1. #include "stopwatchwidget.h"
    2. StopWatchWidget::StopWatchWidget(const QString& strTitle,
    3. QWidget* pParent,
    4. Qt::WindowFlags flags,
    5. const quint64& iStartingSecs)
    6. : QDockWidget(strTitle, pParent, flags)
    7. {
    8. setCurrentSecs(iStartingSecs); // inits secs
    9. // m_pLCDWidget=createLCDWidget(); // creates LCD widget
    10. m_pWidgetArea=createWidgetArea(); // cretes widget area
    11. QSizePolicy sizePolicy(QSizePolicy::Fixed,
    12. QSizePolicy::Fixed); // window's size policy
    13. // size policy setup
    14. sizePolicy.setHorizontalStretch(0);
    15. sizePolicy.setVerticalStretch(0);
    16. sizePolicy.setHeightForWidth(this->sizePolicy().hasHeightForWidth());
    17. // END OF size policy setup
    18. this->setSizePolicy(sizePolicy); // sets window's size policy
    19. this->setMinimumSize(QSize(250,
    20. 120));
    21. this->setMaximumSize(QSize(250,
    22. 120));
    23. this->setFloating(false);
    24. this->setFeatures(QDockWidget::NoDockWidgetFeatures); // disables [X] and MOVE window buttons
    25. this->setAllowedAreas(Qt::BottomDockWidgetArea);
    26. // this->setWidget(lcdWidget()); // sets dock widget's contens
    27. this->setWidget(stopWatchWidgetArea()); // sets dock's window contens widget
    28. }
    29. /*
    30.  ClockLCDWidget* StopWatchWidget::createLCDWidget(void)
    31.  {
    32.   ClockLCDWidget* pLCDWidget=new ClockLCDWidget(this); // creates LCD widget
    33.   Q_ASSERT_X(pLCDWidget!=0,
    34.   "LCD Widget creation",
    35.   "LCD Widget could not be created"); // checks creation
    36.   return pLCDWidget; // returns created object
    37.  }
    38.  */
    39. StopWatchWidgetArea* StopWatchWidget::createWidgetArea()
    40. {
    41. StopWatchWidgetArea* pStopWatchWidgetArea=new StopWatchWidgetArea(this); // creates new widget area
    42. Q_ASSERT_X(pStopWatchWidgetArea!=0,
    43. "Stopwatch widget area creation",
    44. "Stopwatch widget area could not be created."); // checks creation
    45. return pStopWatchWidgetArea; // returns widget area
    46. }
    To copy to clipboard, switch view to plain text mode 
    Qt 5.3 Opensource & Creator 3.1.2

  4. #4
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Project compile problems

    maybe it helps if you write
    Qt Code:
    1. #include <QDockWidget>
    To copy to clipboard, switch view to plain text mode 
    instead; I also would put
    Qt Code:
    1. #ifndef STOPWATCHWIDGET_H #define STOPWATCHWIDGET_H
    To copy to clipboard, switch view to plain text mode 
    on two lines

  5. #5
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Project compile problems

    Quote Originally Posted by caduel View Post
    maybe it helps if you write
    Qt Code:
    1. #include <QDockWidget>
    To copy to clipboard, switch view to plain text mode 
    instead; I also would put
    Qt Code:
    1. #ifndef STOPWATCHWIDGET_H #define STOPWATCHWIDGET_H
    To copy to clipboard, switch view to plain text mode 
    on two lines
    I did that, but same errors occur!
    Qt 5.3 Opensource & Creator 3.1.2

  6. #6
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Project compile problems

    No one has the idea what is wrong?!
    Qt 5.3 Opensource & Creator 3.1.2

  7. #7
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Thanks
    1
    Thanked 29 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Project compile problems

    Try to do clean build.
    I'm a rebel in the S.D.G.

  8. #8
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Project compile problems

    I have tried, same result ...
    Qt 5.3 Opensource & Creator 3.1.2

Similar Threads

  1. Problems with static compile for QextSerialPort
    By blm in forum Qt Programming
    Replies: 4
    Last Post: 6th October 2009, 12:55
  2. Qwt based project compile problem
    By MarkoSan in forum Qwt
    Replies: 0
    Last Post: 28th September 2009, 15:08
  3. How to Compile VTKDesigner2 with Qt?
    By alfredoaal in forum Newbie
    Replies: 0
    Last Post: 5th September 2008, 05:34
  4. qtgui4.dll error in visual c++ 2005
    By Comptrol in forum Installation and Deployment
    Replies: 33
    Last Post: 19th June 2008, 07:18
  5. Project won't compile under Windows (works under Linux)
    By philski in forum Qt Programming
    Replies: 7
    Last Post: 14th September 2006, 15:29

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.