不知道怎么回事,原来可以编译的程序现在保错了,感觉找不到opengl模块了,如何修复呢?望解答。
g++ -c -pipe -Wall -W -O2 -g -march=i386 -mcpu=i686 -DQT_NO_DEBUG -DQT_SHARED -DQT_THREAD_SUPPOR
T -I/usr/lib/qt-3.3/mkspecs/default -I. -I. -I/usr/lib/qt-3.3/include -o main.o main.cpp
g++ -c -pipe -Wall -W -O2 -g -march=i386 -mcpu=i686 -DQT_NO_DEBUG -DQT_SHARED -DQT_THREAD_SUPPOR
T -I/usr/lib/qt-3.3/mkspecs/default -I. -I. -I/usr/lib/qt-3.3/include -o nehewidget.o nehewidget.
cpp
/usr/lib/qt-3.3/bin/moc nehewidget.h -o moc_nehewidget.cpp
g++ -c -pipe -Wall -W -O2 -g -march=i386 -mcpu=i686 -DQT_NO_DEBUG -DQT_SHARED -DQT_THREAD_SUPPOR
T -I/usr/lib/qt-3.3/mkspecs/default -I. -I. -I/usr/lib/qt-3.3/include -o moc_nehewidget.o moc_neh
ewidget.cpp
g++ -o lesson01 main.o nehewidget.o moc_nehewidget.o -L/usr/lib/qt-3.3/lib -L/usr/X11R6/lib -l
qt-mt -lXext -lX11 -lm
nehewidget.o(.text+0x29e): In function `NeHeWidget::initializeGL()':
/root/Desktop/lesson01/nehewidget.cpp:39: undefined reference to `glShadeModel'
nehewidget.o(.text+0x2b7):/root/Desktop/lesson01/nehewidget.cpp:40: undefined reference to `glCle
arColor'
nehewidget.o(.text+0x2c1):/root/Desktop/lesson01/nehewidget.cpp:41: undefined reference to `glCle
arDepth'
nehewidget.o(.text+0x2cd):/root/Desktop/lesson01/nehewidget.cpp:42: undefined reference to `glEna
ble'
nehewidget.o(.text+0x2d9):/root/Desktop/lesson01/nehewidget.cpp:43: undefined reference to `glDep
thFunc'
nehewidget.o(.text+0x2ee):/root/Desktop/lesson01/nehewidget.cpp:44: undefined reference to `glHin
t'
nehewidget.o(.text+0x30e): In function `NeHeWidget::paintGL()':
/root/Desktop/lesson01/nehewidget.cpp:49: undefined reference to `glClear'
nehewidget.o(.text+0x34d): In function `NeHeWidget::resizeGL(int, int)':
/root/Desktop/lesson01/nehewidget.cpp:59: undefined reference to `glViewport'
nehewidget.o(.text+0x359):/root/Desktop/lesson01/nehewidget.cpp:60: undefined reference to `glMat
rixMode'
nehewidget.o(.text+0x35e):/root/Desktop/lesson01/nehewidget.cpp:61: undefined reference to `glLoa
dIdentity'
nehewidget.o(.text+0x39f):/root/Desktop/lesson01/nehewidget.cpp:62: undefined reference to `gluPerspective'
nehewidget.o(.text+0x3ab):/root/Desktop/lesson01/nehewidget.cpp:63: undefined reference to `glMatrixMode'
nehewidget.o(.text+0x314): In function `NeHeWidget::paintGL()':
/root/Desktop/lesson01/nehewidget.cpp:50: undefined reference to `glLoadIdentity'
nehewidget.o(.text+0x3b6): In function `NeHeWidget::resizeGL(int, int)':
/root/Desktop/lesson01/nehewidget.cpp:64: undefined reference to `glLoadIdentity'
collect2: ld returned 1 exit status
make: *** [lesson01] 错误 1
[ 此贴被XChinux在2006-10-09 13:11重新编辑 ]