回复: qt3贪吃蛇游戏交流学习
#6 [nmiirq 11-16 17:01]
不错不错,顶楼主一下!
#7 [binbin1234 12-07 00:20]
不错
顶
谢谢
#8 [tangaowen 02-15 17:01]
我下载下来,运行怎么出现错误啊
内容如下:
Setting up a MinGW/Qt only environment...
-- QTDIR set to C:\Qt
-- PATH set to C:\Qt\bin
-- Adding C:\MinGW\bin to PATH
-- Adding C:\Windows\System32 to PATH
-- QMAKESPEC set to win32-g++
C:\Qt>cd..
C:\>cd snake
我第一次用Qt
别笑话哦
C:\snake>qmake -project
C:\snake>qmake snake.pro
C:\snake>make
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/snake'
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"..\Qt
\include\QtCore" -I"..\Qt\include\QtCore" -I"..\Qt\include\QtGui" -I"..\Qt\inclu
de\QtGui" -I"..\Qt\include" -I"." -I"c:\Qt\include\ActiveQt" -I"debug" -I"." -I"
..\Qt\mkspecs\win32-g++" -o debug\main.o main.cpp
In file included from main.cpp:13:
snake.h:23: error: `WFlags' has not been declared
snake.h:23: error: ISO C++ forbids declaration of `f' with no type
snake.h:23: error: `WStyle_NoBorder' was not declared in this scope
main.cpp: In function `int qMain(int, char**)':
main.cpp:20: error: 'class SnakeGame' has no member named 'setCaption'
main.cpp:22: error: 'class QApplication' has no member named 'setMainWidget'
mingw32-make[1]: *** Error 1
mingw32-make[1]: Leaving directory `C:/snake'
mingw32-make: *** Error 2
C:\snake>
#9 [553716434 03-28 13:45]
谢谢分享了支持
#10 回 4楼(youngst) 的帖子 [hzliqing 05-07 16:21]
Ding