我在windows下编写的程序可以运行的,现在要移植到linux下出现了如下的问题:
main.cpp: In function 'int main(int, char**);
main.cpp: 'MainWindow'undeclare identifier(first use this function)
main.cpp:(Each undeclared identifier is reported only once for each function
it appears in.)
main.cpp:parse error before ';'token
main.cpp: 'w' undeclared (first use this function)
make: *** [main.o] Error 1
我的main函数中的源代码如下:
 #include <QtGui/QApplication> 
#include "mainwindow.h" 
#include<QTextCodec> 
int main(int argc, char *argv[]) 
{ 
       QApplication a(argc, argv); 
       QTextCodec::setCodecForTr(QTextCodec::codecForName("GB2312"));
       MainWindow w ; 
      w.show(); 
      return a.exec();
}
望高手解答~