目录
一 编译环境
二 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
|