主题 : 編譯QT出錯,請高手幫忙看下 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 49309
精华: 0
发帖: 11
金钱: 60 两
威望: 12 点
综合积分: 22 分
注册时间: 2011-06-10
最后登录: 2017-09-13
楼主  发表于: 2011-06-28 19:27

 編譯QT出錯,請高手幫忙看下

打好補丁,設置好環境變量,make后,出現提示如下:
是哪裡出錯了。系統是UBUNTU9.10.
root@ubuntu:/opt/qtopia-free-2.2.0# make
/opt/qtopia-free-2.2.0/qtopia/scripts/buildQtopia
Building Qtopia Tools.

***********************************
********* Build Qt 2 **************
***********************************
QT2_CFG="'-no-opengl' '-no-xft' -platform 'linux-g++'"


This is the Qt Free Edition.

You are licensed to use this software under the terms of either
the Q Public License (QPL) or the GNU General Public License (GPL).

Type 'Q' to view the Q Public License.
Type 'G' to view the GNU General Public License.
Type 'yes' to accept this license offer.
Type 'no' to decline this license offer.

Do you accept the terms of the license?
symlink created for src/tools/qconfig-qpe.h

        This target is using the GNU C++ compiler (linux-g++).

        Recent versions of this compiler automatically include
        code for exceptions, which increase both the size of
        the Qt library and the amount of memory taken by your
        applications.

        You may elect to re-run ./configure with the -no-g++-exceptions
        option to compile Qt without exceptions.  This is
        completely binary compatible, and existing
        applications will continue to work (like KDE 2).


Build type:    linux-g++-shared

Thread support..................... no
GIF support........................ no
MNG support........................ no
JPEG support....................... no
OpenGL support .................... no
NAS sound support.................. no
Session management................. no
Xft support (Anti-Aliased Fonts) .. no
XKB support ....................... no

Creating makefiles...
Qt is now configured for building. Just run make.
To reconfigure, run make clean and configure.

make[1]: Entering directory `/opt/qtopia-free-2.2.0/qt2/src/moc'
g++  -c -I/opt/qtopia-free-2.2.0/qt2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DNO_DEBUG -DQT_NO_CODECS -DQT_LITE_UNICODE -DQT_BUILDING_MOC -I../../include -I../tools -I. -o mocgen.o mocgen.cpp
make[1]: g++: Command not found
make[1]: *** [mocgen.o] Error 127
make[1]: Leaving directory `/opt/qtopia-free-2.2.0/qt2/src/moc'
* ---------------------------------------------------------------------------
*
*               ERROR: Building Qtopia Tools has failed.
*
* Please investigate the problem by looking at the error messages in the
* make output.
* The Qtopia tools can be build using the separate buildQtopiaTools script
* which can be found in the qtopia/scripts directory of the package. The
* script is also invoked with the command 'make tools' from the package root
* directory.
*
* On most machines the default configuration options in the script works fine.
* In case this doesn't work the configure parameters in the buildQtopiaTools
* script need to be tweaked to fit the environment/compiler used on the machine
* and then run manually from the cmd line.
*
* Please make sure that the following binaries exist before trying to build
* Qtopia:
*   /opt/qtopia-free-2.2.0/qt2/bin/moc
*   /opt/qtopia-free-2.2.0/qt2/bin/uic
*   /opt/qtopia-free-2.2.0/qt2/bin/qvfb
*   /opt/qtopia-free-2.2.0/dqt/bin/lrelease
*   /opt/qtopia-free-2.2.0/dqt/bin/lupdate
*
* As a rule, these tools need to be built only once.
*
******************************************************************************

***********************************
********* Build Qt 3 **************
***********************************
DQT_CFG="'-no-xft' '-thread' -platform 'linux-g++'"


This is the Qt/X11 Open Source Edition.

You are licensed to use this software under the terms of either
the Q Public License (QPL) or the GNU General Public License (GPL).

Type 'Q' to view the Q Public License.
Type 'G' to view the GNU General Public License.
Type 'yes' to accept this license offer.
Type 'no' to decline this license offer.

Do you accept the terms of either license?
Creating qmake. Please wait...
make[1]: Entering directory `/opt/qtopia-free-2.2.0/dqt/qmake'
g++ -c -o project.o -pipe -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -I/opt/qtopia-free-2.2.0/dqt/include/qmake -I/opt/qtopia-free-2.2.0/dqt/include -I/opt/qtopia-free-2.2.0/dqt/include -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/opt/qtopia-free-2.2.0/dqt/mkspecs/linux-g++ -DHAVE_QCONFIG_CPP project.cpp
make[1]: g++: Command not found
make[1]: *** [project.o] Error 127
make[1]: Leaving directory `/opt/qtopia-free-2.2.0/dqt/qmake'
qmake failed to build. Aborting.
* ---------------------------------------------------------------------------
*
*               ERROR: Building Qtopia Tools has failed.
*
* Please investigate the problem by looking at the error messages in the
* make output.
* The Qtopia tools can be build using the separate buildQtopiaTools script
* which can be found in the qtopia/scripts directory of the package. The
* script is also invoked with the command 'make tools' from the package root
* directory.
*
* On most machines the default configuration options in the script works fine.
* In case this doesn't work the configure parameters in the buildQtopiaTools
* script need to be tweaked to fit the environment/compiler used on the machine
* and then run manually from the cmd line.
*
* Please make sure that the following binaries exist before trying to build
* Qtopia:
*   /opt/qtopia-free-2.2.0/qt2/bin/moc
*   /opt/qtopia-free-2.2.0/qt2/bin/uic
*   /opt/qtopia-free-2.2.0/qt2/bin/qvfb
*   /opt/qtopia-free-2.2.0/dqt/bin/lrelease
*   /opt/qtopia-free-2.2.0/dqt/bin/lupdate
*
* As a rule, these tools need to be built only once.
*
******************************************************************************

***********************************
********* Build Qt/Embedded *******
***********************************
QTE_CFG="'-embedded' '-no-xft' '-qconfig' 'qpe' '-depths' '16,32' '-system-jpeg' '-gif' -release -platform 'linux-g++' -xplatform 'linux-generic-g++'"


This is the Qt/Embedded Free Edition.

You are licensed to use this software under the terms of
the GNU General Public License (GPL).

Type 'G' to view the GNU General Public License.
Type 'yes' to accept this license offer.
Type 'no' to decline this license offer.

Do you accept the terms of the license?

Enable Qt Virtual Framebuffer support for development on X11 (default yes)
symlink created for src/tools/qconfig-qpe.h

        This target is using the GNU C++ compiler (linux-g++).

        Recent versions of this compiler automatically include
        code for exceptions, which increase both the size of
        the Qt library and the amount of memory taken by your
        applications.

        You may elect to re-run ./configure with the -no-g++-exceptions
        option to compile Qt without exceptions.  This is
        completely binary compatible, and existing
        applications will continue to work (like KDE 2).


Building on:   linux-g++-shared
Building for:  linux-generic-g++-shared

Thread support..................... no
Configuration...................... qconfig-qpe.h

Creating makefiles...
Qt is now configured for building. Just run make.
To reconfigure, run make clean and configure.

make[1]: Entering directory `/opt/qtopia-free-2.2.0/qt2/src'
echo '#include "kernel/qt.h"' >allmoc.cpp
g++  -E -DQT_MOC_CPP -I/opt/qtopia-free-2.2.0/qt2/include  -pipe -DQWS -fno-exceptions -fno-rtti -O2 -Wall -W -DNO_DEBUG -fPIC -DQT_NO_QWS_SNAP -DQT_NO_QWS_VOODOO3 -DQT_NO_QWS_MACH64 -DQT_NO_QWS_MATROX -DQT_NO_QWS_VNC -DQT_NO_QWS_VGA_16 -DQT_NO_QWS_DEPTH_4 -DQT_NO_QWS_DEPTH_8 -DQT_NO_QWS_DEPTH_18 -DQT_NO_QWS_DEPTH_24 -DQT_BUILTIN_GIF_READER=1 -DQT_NO_IMAGEIO_MNG -DQT_NO_SM_SUPPORT -DQT_NO_XKB  -I/opt/qtopia-free-2.2.0/qt2/src/3rdparty/zlib -I/opt/qtopia-free-2.2.0/qt2/src/3rdparty/libpng -I/usr/X11R6/include  -I3rdparty/kernel -I3rdparty/tools >allmoc.h allmoc.cpp
/bin/sh: g++: not found
make[1]: *** [allmoc.cpp] Error 127
make[1]: Leaving directory `/opt/qtopia-free-2.2.0/qt2/src'

***********************************************************************
*  
*                  ERROR: Building Qtopia has failed.
*  
* Please search the make output for any error messages.
*  
* Hint: If the configuration has changed since the last successfull
* build consider using make clean to ensure that all binaries
* are rebuilt using the new configuration.
*  
* For more information about the build process please use a browser
* and go to the getting started section in:
*     /opt/qtopia-free-2.2.0/qtopia/doc/html/index.html
*  
***********************************************************************

***********************************
********* Build Qtopia ************
***********************************
QPE_CFG="'-edition' 'pda' '-displaysize' '240x320' -no-qtopiadesktop -release -platform 'linux-g++' -xplatform 'linux-generic-g++'"

The following configuration values have been guessed or autodetected:
    -arch generic
    -fontfamilies helvetica fixed micro smallsmooth smoothtimes
    -fontsizes all
    -fontstyles 50 50i 75 75i
    -languages en_US
    -qvfb

Symlinking header files to include directory
Creating qmake...No makedepend available
make[1]: Entering directory `/opt/qtopia-free-2.2.0/qtopia/qmake'
make[1]: *** [project.o] Error 127
make[1]: Leaving directory `/opt/qtopia-free-2.2.0/qtopia/qmake'
Failed to make qmake

***********************************************************************
*  
*                  ERROR: Building Qtopia has failed.
*  
* Please search the make output for any error messages.
*  
* Hint: If the configuration has changed since the last successfull
* build consider using make clean to ensure that all binaries
* are rebuilt using the new configuration.
*  
* For more information about the build process please use a browser
* and go to the getting started section in:
*     /opt/qtopia-free-2.2.0/qtopia/doc/html/index.html
*  
***********************************************************************
级别: 新手上路
UID: 49309
精华: 0
发帖: 11
金钱: 60 两
威望: 12 点
综合积分: 22 分
注册时间: 2011-06-10
最后登录: 2017-09-13
1楼  发表于: 2011-06-28 19:29
g++.我安裝了,怎麼會沒有找到呢。
级别: 新手上路
UID: 49309
精华: 0
发帖: 11
金钱: 60 两
威望: 12 点
综合积分: 22 分
注册时间: 2011-06-10
最后登录: 2017-09-13
2楼  发表于: 2011-06-28 19:33
暈,怎麼是g++,不是應該是GCC嗎?是不是要修改成GCC就可以了?