日期:2014-05-16  浏览次数:20775 次

新手编译问题
各位大牛,我有一个问题,恳请大家帮帮我!  

我按着以下例子在QT   Designer下写了一个程序。  

#include   <qapplication.h>  
#include   <qpushbutton.h>  


int   main(   int   argc,   char   **argv   )  
{  
QApplication   a(   argc,   argv   );  

QPushButton   hello(   "Hello   world! ",   0   );  
hello.resize(   100,   30   );  

a.setMainWidget(   &hello   );  
hello.show();  
return   a.exec();  
}  

但是在终端执行:  
qmake   -project  
qmake  
都没有问题,  
然后执行make,却有以下问题:  
Hello.cpp:   In   function   'int   main(int,char**) ';  
Hello.cpp:9:   parse   error   before   '. '   token  
make:   ***[Hello.o]   Error   1  

请各位指教!  


------解决方案--------------------
int main( int argc, char **argv[] )

是这样的吗?