小编vre*_*vre的帖子

CMake - 找不到“QT”提供的包配置文件

我在使用 CMake 时遇到了一些问题。当我尝试为 Visual Studio 2019 配置构建时,它显示错误。当我检查 CMakeLists.txt 时,一切看起来都很好,但仍然有问题。该文件是由 Qt 自动创建的,我只是添加了一些东西来连接一些目录。我可以做什么来解决这个问题?

这是错误:

Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041.
The CXX compiler identification is MSVC 19.28.29334.0
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working CXX compiler: D:/VS/VS-IDE/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - skipped
Detecting CXX compile features
Detecting CXX compile features - done
CMake Error at CMakeLists.txt:27 (find_package):
  Could not find a package configuration file provided by "QT" with any of
  the following names:

    Qt6Config.cmake …
Run Code Online (Sandbox Code Playgroud)

c++ qt cmake

5
推荐指数
2
解决办法
4万
查看次数

使用 Gradle 和 CMake 将静态“.a”库链接到 Android Studio 项目

我需要使用 CMakeLists.txt 将预构建的“.a”静态库链接到 Android Studio 项目。

.a 库正确构建为armeabi、armeabiv-7a、mips 和x86(甚至可以“objdumped”进行“内容检查”),“.h”文件也恰到好处。

目标不是将库源代码与我的 Android Studio 项目本机源代码一起重新编译。

另外,请不要参考使用 NDK + Andoid.mk(仅限 CMakeLists.txt)的解决方案。

由于网络上没有关于此问题的有效示例(包括 Google NDK 文档和 SO),因此请提供项目文件和/或项目结构所需的所有更改。

我将“.a”文件及其“include”目录保留在本地文件夹中,因此作为对此位置的元引用,请考虑 /lib.a 和 /include。

谢谢。

linker static android cmake gradle

3
推荐指数
1
解决办法
2562
查看次数

标签 统计

cmake ×2

android ×1

c++ ×1

gradle ×1

linker ×1

qt ×1

static ×1