[Qt-interest] 答复: compile failed

Xiaolei Shang xiaolei.shang at cobham.com
Wed Jul 27 11:07:19 CEST 2011


 When you used Designer to develop GUIs, the Qt generates ui_....h files
which define all widgets variables and configurations. When you removed
some widgets and added them again at other places, I think the generated
ui_.h files get confused codes. So make sure that you make clear build
if you do those types of operations.

>From your snapshot of the widget, I found that an interesting thing:
it's Chinese and English mixed widget. Is this for Chinese or English?

xiaolei

On 27/07/2011 04:58, pengliang(彭亮) wrote:
>
> Hi All
>
> I know why.
>
> Because I added QGroupBox first, then added the QScrollArea, and then
> I moved QGroupBox into QScrollArea. so, I could not compile it.
>
> Now, I create a new program and add QScrollArea first, it is compile
> successful.
>
> Anybody could tell me why?
>
> -----邮件原件-----
> 发件人: pengliang(彭亮)
> 发送时间: 2011年7月27日 10:57
> 收件人: qt-interest at qt.nokia.com
> 主题: [Qt-interest] compile failed
>
> Hi All:
>
> I compiled my program which is attached file failed. But I could not
> find any error in my program.
>
> Could anybody help me to check the error message and tell me why I failed.
>
> Thanks and BR.
>
> Ken
>
> ------------------------------------------------- error message
>
> g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE
>
> g++ -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB
>
> g++ -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT
>
> g++ -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN
>
> g++ -I"d:\ProgramFiles\Qt\4.7.3\include\QtCore"
>
> g++ -I"d:\ProgramFiles\Qt\4.7.3\include\QtGui"
>
> g++ -I"d:\ProgramFiles\Qt\4.7.3\include"
>
> g++ -I"d:\ProgramFiles\Qt\4.7.3\include\ActiveQt" -I"debug" -I"."
>
> g++ -I"..\calCouponGui" -I"."
>
> g++ -I"d:\ProgramFiles\Qt\4.7.3\mkspecs\win32-g++" -o debug\mainwindow.o
>
> g++ ..\calCouponGui\mainwindow.cpp
>
> ..\calCouponGui\mainwindow.cpp: In constructor
> 'MainWindow::MainWindow(QWidget*)':
>
> ..\calCouponGui\mainwindow.cpp:8: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:10: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp: In destructor 'virtual
> MainWindow::~MainWindow()':
>
> ..\calCouponGui\mainwindow.cpp:19: warning: possible problem detected
> in invocation of delete operator:
>
> ..\calCouponGui\mainwindow.cpp:19: warning: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: warning: forward declaration of
> 'struct Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:19: note: neither the destructor nor
> the class-specific operator delete will be called, even if they are
> declared when the class is defined.
>
> ..\calCouponGui\mainwindow.cpp: In member function 'void
> MainWindow::initMSW1()':
>
> ..\calCouponGui\mainwindow.cpp:25: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:29: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:30: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:31: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:32: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:33: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:34: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp: In member function 'void
> MainWindow::on_msw1InsertPushButton_clicked()':
>
> ..\calCouponGui\mainwindow.cpp:46: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:47: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:58: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:59: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:60: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:61: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp: In member function 'void
> MainWindow::on_msw1DeletePushButton_clicked()':
>
> ..\calCouponGui\mainwindow.cpp:67: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:75: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:78: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp: In member function 'void
> MainWindow::on_msw1LayerCountLineEdit_textChanged(QString)':
>
> ..\calCouponGui\mainwindow.cpp:88: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:89: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:90: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:108: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:109: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> ..\calCouponGui\mainwindow.cpp:110: error: invalid use of incomplete
> type 'struct Ui::MainWindow'
>
> ..\calCouponGui\/mainwindow.h:9: error: forward declaration of 'struct
> Ui::MainWindow'
>
> mingw32-make[1]: Leaving directory `E:/qt/calCouponGui-build-desktop'
>
> mingw32-make: Leaving directory `E:/qt/calCouponGui-build-desktop'
>
> mingw32-make[1]: *** [debug/mainwindow.o] Error 1
>
> mingw32-make: *** [debug] Error 2
>
> The process
> "D:/ProgramFiles/Qt/qtcreator-2.0.1/mingw/bin/mingw32-make.exe" exited
> with code %2.
>
> Error while building project calCouponGui (target: Desktop) When
> executing build step 'Make'
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110727/cdb2e0d9/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 30675 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110727/cdb2e0d9/attachment.png 


More information about the Qt-interest-old mailing list