提问人:Desmond Chi 提问时间:8/31/2023 更新时间:8/31/2023 访问量:57
SDL2 项目的 Bazel 链接.dll
Bazel linking .dll for SDL2 project
问:
我想知道如何使用 Windows 动态和静态库正确设置 SDL2 的 Bazel 目标。我可以在我的文件中更改哪些内容以考虑 Windows SDL2 库的文件?BUILD
.dll
这是我的 Git 存储库供参考。(具体而言,还有third_party/BUILD
main/BUILD
)
https://github.com/desmondcchi/bullet_hell_sdl2_game
当我运行二进制文件时,这是显示的错误://main:bullet_hell_main
ERROR: D:/dev/bullet_hell_sdl2_game/main/BUILD:3:10: Linking main/bullet_hell_main.exe failed: (Exit 1181): link.exe failed: error executing command (from target //main:bullet_hell_main) C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\HostX64\x64\link.exe @bazel-out/x64_windows-opt/bin/main/bullet_hell_main.exe-2.params
LINK : warning LNK4044: unrecognized option '/framework'; ignored
LINK : fatal error LNK1181: cannot open input file 'OpenGL.obj'
Target //main:bullet_hell_main failed to build
但是,将 SDL2 目标作为依赖项的其他目标可以正常构建(例如 )。//game:game
任何帮助将不胜感激!谢谢!
我尝试将SDL2.dll文件(内部)复制到文件夹中,但似乎不起作用。正如您在我设置 SDL2 目标中所看到的,以便在我在 macOS 和 Windows 上开发时切换依赖项。third_party/sdl2/2.28.2/windows_x64/bin
bazel-bin
third_party/BUILD
答: 暂无答案
评论