• 4920阅读
  • 1回复

新手求救!关于安装、编译问题!恳求各位老大帮助! [复制链接]

上一主题 下一主题
离线goneinwind
 
只看楼主 正序阅读 楼主  发表于: 2008-08-04
— 本帖被 XChinux 执行加亮操作(2008-08-05) —
大家好:
今天刚刚注册,烦劳各位帮我!
关于安装问题!
我整个的操作过程如下:
1 下载:qt-win-opensource-4.4.0-mingw.exe;
2  然后安装,选择安装下载MinGW-3.4.2.exe;
3  安装完成后,QT COMMOND Prompt
4  在相应路径下,qmake
5  make
可是,就是总报错,连Hello这样的都编译不了!

我又安装了Visual-MinGW,也是报错!

我有重新下载:MinGW-5.1.4.exe,重新安装。
还是不行!!!
并且也把bin设为环境变量path

真的被打败了!

由于是菜鸟,才一个星期!

可是如果连这个最简单的都编译不了,太伤自尊了!

感觉还是到论坛来,向列为高手求救把!

先谢谢了!

下面是make后的提示:
Setting up a MinGW/Qt only environment...
-- QTDIR set to C:\Qt\4.4.0
-- PATH set to C:\Qt\4.4.0\bin
-- Adding C:\MinGW\bin to PATH
-- Adding C:\WINDOWS\System32 to PATH
-- QMAKESPEC set to win32-g++

C:\Qt\4.4.0>cd H:\QT\examples\chap01\hello

C:\Qt\4.4.0>h:

H:\QT\examples\chap01\hello>make
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `H:/QT/examples/chap01/hello'
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
\4.4.0\include\QtCore" -I"c:\Qt\4.4.0\include\QtCore" -I"c:\Qt\4.4.0\include\QtG
ui" -I"c:\Qt\4.4.0\include\QtGui" -I"c:\Qt\4.4.0\include" -I"." -I"c:\Qt\4.4.0\i
nclude\ActiveQt" -I"debug" -I"." -I"c:\Qt\4.4.0\mkspecs\win32-g++" -o debug\hell
o.o hello.cpp
hello.cpp: In function `int qMain(int, char**)':
hello.cpp:8: error: 'class QApplication' has no member named 'setMainWidget'
mingw32-make[1]: *** [debug/hello.o] Error 1
mingw32-make[1]: Leaving directory `H:/QT/examples/chap01/hello'
mingw32-make: *** [debug] Error 2

H:\QT\examples\chap01\hello>




离线goneinwind
只看该作者 1楼 发表于: 2008-08-05
解决了,谢谢各位了!
老大,这个帖子我自己删除不了!请删除吧!
问题:
我用的Example的文件不是针对QT4的
快速回复
限100 字节
 
上一个 下一个