使用 vcpkg 安装 box2d
Installing box2d with vcpkg
当我尝试在vscode中#include <box2d/box2d.h>
时。我收到此错误:
fatal error: box2d/box2d.h: No such file or directory
#include <box2d/box2d.h>
甚至 vscode 在我包含它
时自动完成库 我的 vcpkg 列表./vcpkg list
box2d:x64-linux 2019-12-31 An open source C++ engine for simulating rigid b...
我还./vcpkg integrate install
输出了
集成步骤:
Applied user-wide integration for this vcpkg root.
CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=/home/mohamed/packman/scripts/buildsystems/vcpkg.cmake"
我在安装库时是否缺少一个步骤
安装软件包vcpkg install box2d
时,您应该有 CMake 目标指令。例如,我有这个:
The package box2d:x64-linux provides CMake targets:
find_package(unofficial-box2d CONFIG REQUIRED)
target_link_libraries(main PRIVATE unofficial::box2d::box2d)
然后,您需要使用这些说明更新CMakeLists.txt
,并最终将其替换为目标的名称main
。
相关文章:
- 在Ubuntu 16.04上安装Cilk时出现问题
- 在CMakeLists.txt的安装功能中使用.cmake文件有什么用
- C++:如何在CLion IDE中安装Boost
- 安装opencv失败-粘贴CMakeError.log的内容
- 在cygwin中测试新的boost安装时出现cpp错误
- 有人安装"IITB Simplecpp in mac"吗?
- 我可以在 Arduino 的库文件夹之外安装库吗?
- Mingw-64 在构建和安装后不会编译 openCV 代码
- 为什么构建目录中新构建的共享库与安装目录中的副本具有不同的依赖项集?
- 安装 libc++ 时出现问题
- 安装MinGW后C++编译器不起作用?
- 介子复制/安装头文件到输出目录并保持文件夹结构
- 无法安装 R 包 "nloptr"(Ubuntu 16.04 上的 R3.6.2) - C++编译器问题
- 如何在 Ubuntu 上安装 OpenCV for C/C++
- 检查是否安装了 windows10 C++
- 安装 psutil 和为 pypy 配置期间出错
- 如何在 Debian 10 上安装 CPP 手册页?
- 如何更改使用 CPack 安装的可执行文件的名称?
- 使用 vcpkg 安装 box2d
- Box2D静态库项目安装问题