关于qtcreator无法编译, make命令可以编译的问题

众里寻佳千百度1995 众里寻佳千百度1995 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
交叉编译工具已经安装配置路径如图:



Build—>run qmake 没有问题:
15:00:31: Running steps for project untitled_new1...
15:00:31: Starting: "/opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake" /mnt/hgfs/qt_vmshare/untitled_new1/untitled_new1.pro -r -spec linux-oe-g++ CONFIG+=debug
15:00:32: The process "/opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake" exited normally.
15:00:32: Elapsed time: 00:01.

Build—> Buildall 编译出错:
15:05:43: Running steps for project untitled_new1...
15:05:43: Configuration unchanged, skipping qmake step.
15:05:43: Starting: "/usr/bin/make"
c -pipe -g -DLINUX=1 -DEGL_API_FB=1 -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ -I. -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5 -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWidgets -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtGui -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtCore -I. -I. -o main.o main.cpp
make: c: Command not found
Makefile:709: recipe for target 'main.o' failed
c -pipe -g -DLINUX=1 -DEGL_API_FB=1 -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ -I. -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5 -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWidgets -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtGui -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtCore -I. -I. -o widget.o widget.cpp
Makefile:845: recipe for target 'widget.o' failed
make: [main.o] Error 127 (ignored)
make: c: Command not found
make: [widget.o] Error 127 (ignored)
c -pipe -g -DLINUX=1 -DEGL_API_FB=1 -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ -I. -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5 -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWidgets -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtGui -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtCore -I. -I. -o moc_widget.o moc_widget.cpp
Makefile:848: recipe for target 'moc_widget.o' failed
o untitled_new1 main.o widget.o moc_widget.o -L/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGLESv2 -lEGL -lGAL -lpthread
Makefile:202: recipe for target 'untitled_new1' failed
make: c: Command not found
make: [moc_widget.o] Error 127 (ignored)
make: o: Command not found
make: [untitled_new1] Error 127 (ignored)
15:05:43: The process "/usr/bin/make" exited normally.
15:05:43: Elapsed time: 00:00.

如果在工程目录使用:make命令编译程序。也是没有问题的,可以生产可执行文件。

使用qtcreator编译就会出错,是什么原因。



...全文

相关推荐

Linux下QT安装

Linux下的QT安装手册 安装qtcreator2.1 同时有windows下的安装和gcc的配置

qxd12345678

QtCreator+CMake编译器设置

QtCreator+CMake编译器设置一、背景二、错误类型错误1错误2错误3三、问题解释四、QtCreator下使用CMake的具体配置五、 后记 一、背景 最近在接触使用Qt完成跨平台方案的验证工作,在使用Qt编译器是,发现可以使用CMake进行工程构建,可惜怎么都无法运行。最终经过摸索,终于找到了原因,整理成文章,希望对其他人有帮助。 二、错误类型 错误1 CMake Error: Generator: execution of make failed. Make command was: jom

longlongway2012

QtCreator5.12.6安装教程[可运行源码]

本文详细介绍了QtCreator5.12.6在Windows 10专业版系统上的安装步骤。首先,用户需从官网或网盘下载qt-opensource-windows-x86-5.12.6.exe安装包,建议使用迅雷加速下载。安装过程中需以管理员身份运行,并注意杀毒软件可能误报,需允许安装。安装位置建议修改并记住,以便后续配置环境变量。安装选项可根据需求选择,全选约20多G,建议安装源码以便学习。安装完成后,需配置环境变量,将Qt的bin和编译链中的bin路径添加到系统变量Path中,以确保生成的exe文件能正常运行。整个过程耗时较长,需耐心等待。

wind

Qt5.12.10编译xcb报错解决[源码]

在使用Qt5.12.10源码编译时,可能会遇到‘xcb’库报错的问题,具体表现为ERROR: Feature ‘xcb’ was enabled, but the pre-condition ‘features.thread && features.xkbcommon && libs.xcb’ failed。如果忽略此问题继续安装,会导致缺少libqxcb.so文件,进而影响QtCreator构建工程。解决方法是依次安装相关依赖库,如libxcb-dev、libx11-xcb-dev等,然后重新执行./configure -recheck-all命令检查xcb配置项是否为yes。若仍有问题,需检查config.log文件,找出具体失败的依赖项并重新安装,最后重新执行安装流程即可。

nokia

银河麒麟系统V10sp1 Arm64 QT环境搭建指南

银河麒麟系统V10sp1 Arm64 QT环境搭建指南 原版系统麒麟V10 sp1 自带的QTCreator 不带QT内核;需要手动下载安装; 安装后opengl gllib可能会被降级; 3、打开QTCreator 设置QT5.12.8版本; 如果没有自动找到则需要手动设置; 原本版本为桌面 ->改为5.12.8 与QT 版本一致

麻浦区保安
评论 5
收藏 已收藏
分享
返回顶部
众里寻佳千百度1995
Qt 21,504 成员 26,693 内容