gcc编译问题

发布于 2024-12-28 14:05:40 字数 1597 浏览 4 评论 0原文

我正在尝试编译但收到以下错误消息。我尝试用谷歌搜索 但无法找出解决方案。

Creating qmake. Please wait...
g++ -c -o project.o -m64 -pipe -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators 
-Igenerators/unix -Igenerators/win32 -Igenerators/mac -I/tmp/qt-x11-opensource-src-4.2.3
/src/corelib/arch/generic -I/tmp/qt-x11-opensource-src-4.2.3/include -I/tmp/qt-x11-opensource-src-4.2.3/include/QtCore -I/tmp/qt-x11-opensource-src-4.2.3/include -I/tmp/qt-x11-opensource-src-4.2.3/include/QtCore -I/tmp/qt-x11-opensource-src-4.2.3/src/corelib/global -I/tmp/qt-x11-opensource-src-4.2.3/src/3rdparty/md5 -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_BUILD_QMAKE -DQT_NO_COMPRESS -I/tmp/qt-x11-opensource-src-4.2.3/mkspecs/linux-g++-64 -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT  project.cpp
project.cpp:1: sorry, unimplemented: 64-bit mode not compiled in
gmake: *** [project.o] Error 1

机器名称

Linux   #1 SMP Sun May 10 18:54:51 MSD 2009 x86_64 x86_64 x86_64 GNU/Linux

g++ -v

Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)

I am trying to compile but getting following error message. I tried to search into google
but was not able to figure out the solution.

Creating qmake. Please wait...
g++ -c -o project.o -m64 -pipe -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators 
-Igenerators/unix -Igenerators/win32 -Igenerators/mac -I/tmp/qt-x11-opensource-src-4.2.3
/src/corelib/arch/generic -I/tmp/qt-x11-opensource-src-4.2.3/include -I/tmp/qt-x11-opensource-src-4.2.3/include/QtCore -I/tmp/qt-x11-opensource-src-4.2.3/include -I/tmp/qt-x11-opensource-src-4.2.3/include/QtCore -I/tmp/qt-x11-opensource-src-4.2.3/src/corelib/global -I/tmp/qt-x11-opensource-src-4.2.3/src/3rdparty/md5 -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_BUILD_QMAKE -DQT_NO_COMPRESS -I/tmp/qt-x11-opensource-src-4.2.3/mkspecs/linux-g++-64 -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT  project.cpp
project.cpp:1: sorry, unimplemented: 64-bit mode not compiled in
gmake: *** [project.o] Error 1

machine name

Linux   #1 SMP Sun May 10 18:54:51 MSD 2009 x86_64 x86_64 x86_64 GNU/Linux

g++ -v

Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

握住我的手 2025-01-04 14:05:40

当您的 g++ 版本可能是在没有 64 位标志的情况下编译时,您尝试使用 -m64 开关编译程序。

You're trying to compile your program using the -m64 switch when your version of g++ was probably compiled without the 64-bit flag.

烙印 2025-01-04 14:05:40

您的 gcc 是为 32 位模式编译的,而您正在尝试为 64 位模式编译代码。

Your gcc is compiled for 32 bit mode and you are trying to compile your code for 64 bit mode.

辞旧 2025-01-04 14:05:40

看来您的编译器不支持 64 位内存模型。
您可以尝试不使用-m64参数,或者安装64位版本的gcc。

Looks like your compiler doesn't support 64 bit memory model.
You may try without -m64 parameter, or install 64-version of the gcc.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文