IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> C++知识库 -> qt creator + vs2019编译记录 -> 正文阅读

[C++知识库]qt creator + vs2019编译记录

目录

一 编译环境

二 qt creator编译脚本成功

三? 不带Nanja的qt creator编译脚本,不行

四? 错误示范?

五? 参考链接


一 编译环境

win10

python3.9

vs2019

?

?

二 qt creator编译脚本成功

一定记得打开

x64 Native Tools Command Prompt for VS <version>

cd D:\\BaiduNetdiskDownload\\liulanqixiazai\\qtcreator_build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja -DCMAKE_PREFIX_PATH="C:/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5;C:/libclang-release_140-based-windows-vs2019_64/libclang/lib/cmake/llvm"  D:\\BaiduNetdiskDownload\\liulanqixiazai\\qt-creator
cd D:\\BaiduNetdiskDownload\\liulanqixiazai\\qt-creator
cmake --build .

?

三? 不带Nanja的qt creator编译脚本,不行

cd D:\\BaiduNetdiskDownload\\liulanqixiazai\\qtcreator_build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo  -DCMAKE_PREFIX_PATH="C:/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5;C:/libclang-release_140-based-windows-vs2019_64/libclang/lib/cmake/llvm"  D:\\BaiduNetdiskDownload\\liulanqixiazai\\qt-creator
cd D:\\BaiduNetdiskDownload\\liulanqixiazai\\qt-creator
cmake -B .build

四? 错误示范?

cd D:\\BaiduNetdiskDownload\\liulanqixiazai\\qt-creator

cmake -S . -B .build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH="C:/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5;C:/libclang-release_140-based-windows-vs2019_64/libclang/lib/cmake/llvm" 

-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.18363.

Clang build mode mismatch (debug vs release): limiting clangTooling

-- Found PythonLibs: C:/Users/pgjgg/AppData/Local/Programs/Python/Python39/libs/python39.lib (found suitable version "3.9.7", minimum required is "3.9")

-- Could NOT find elfutils (missing: ELFUTILS_INCLUDE_DIR ELFUTILS_LIB_dw ELFUTILS_LIB_elf)

-- PerfParser is disabled. Set ELFUTILS_INSTALL_DIR to enable it.

......

......

......

-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
DbgEngLib
? ? linked by target "qtcreatorcdbext" in directory D:/BaiduNetdiskDownload/liulanqixiazai/qt-creator/src/libs/qtcreatorcdbext

-- Generating done
CMake Generate step failed. ?Build files cannot be regenerated correctly.

Could NOT find elfutils问题未能解决:

尝试如下:

qt-creator/Findelfutils.cmake at master · qt-creator/qt-creator (github.com)

pgjgg@DESKTOP-IQKLRIT MINGW64 /d/BaiduNetdiskDownload/liulanqixiazai/elfutils-latest.tar/elfutils-latest/elfutils-0.187
$ ./configure --enable-maintainer-mode && make && make check
configure: No --program-prefix given, using "eu-"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... no
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) no
checking build system type... x86_64-pc-mingw64
checking host system type... x86_64-pc-mingw64
checking whether make supports the include directive... no
checking for gcc... no
checking for cc... no
checking for cl.exe... cl.exe
checking whether the C compiler works... no
configure: error: in `/d/BaiduNetdiskDownload/liulanqixiazai/elfutils-latest.tar/elfutils-latest/elfutils-0.187':
configure: error: C compiler cannot create executables
See `config.log' for more details

再尝试:

./configure --enable-maintainer-mode && C:\\Qt\\Tools\\MinGW\\bin\\mingw32-make.exe && C:\\Qt\\Tools\\MinGW\\bin\\mingw32-make.exe check

无用,windows搞make,不会了。

生成成功qt creator,不能运行qt creator。

五? 参考链接

qt-creator/qt-creator: A cross-platform Qt IDE (github.com)

qt/qt5: Qt5 super module (github.com)

Index of /official_releases/qtcreator/5.0/5.0.2

Index of /official_releases/qtcreator/7.0/7.0.1

记一次Qt 5.15源码编译 - 知乎 (zhihu.com)

ninja-build/ninja: a small build system with a focus on speed (github.com)

编译 Qt 5.15.x For Windows 基础教程 Visual Studio 2019 MSVC142 x64 - 芯片烤电池 - 博客园 (cnblogs.com)

qt5编译代码

@echo off

call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"

pushd qt5

configure -prefix F:\qt\qt5\install -opensource -confirm-license -qt-sqlite -qt-pcre -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -opengl dynamic -skip qtwebengine -nomake tests -nomake examples -mp -release -optimize-size -strip 
  C++知识库 最新文章
【C++】友元、嵌套类、异常、RTTI、类型转换
通讯录的思路与实现(C语言)
C++PrimerPlus 第七章 函数-C++的编程模块(
Problem C: 算法9-9~9-12:平衡二叉树的基本
MSVC C++ UTF-8编程
C++进阶 多态原理
简单string类c++实现
我的年度总结
【C语言】以深厚地基筑伟岸高楼-基础篇(六
c语言常见错误合集
上一篇文章      下一篇文章      查看所有文章
加:2022-05-10 11:40:56  更:2022-05-10 11:42:17 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年5日历 -2024/5/21 0:36:58-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码