Linux CMake lib prefix not generated
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- cmake
- 领域
- build-system
调研方向
先克隆模板并在 Linux 上运行其 CMake 构建,然后将生成的共享库文件名与 CMake 列表文件和 .gdextension 文件中的名称进行比较。当干净的 CMake 构建生成的名称能够被模板的 .gdextension 文件加载,且不再出现所报告的 ERR_FILE_NOT_FOUND 错误时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Godot version
v 4.6.1
godot-cpp version
current - cloned today
System information
Linux Open suse Tumbleweed
Issue description
I recently had a problem working on an extension and didn't notice the problem for a while because I always built things first with scons. However on a recent project I had not built with scons I started getting file not found errors for the generated shared library.
After solving my user errors, I still had to edit the .gdextension file to adjust the name of the built library file because the cmake build does not add the lib prefix.
To confirm this I cloned the template and tried building it without any changes using cmake. The template builds and launches but there are errors:
ERROR: Condition "!FileAccess::exists(path)" is true. Returning: ERR_FILE_NOT_FOUND
at: open_dynamic_library (drivers/unix/os_unix.cpp:1061)
ERROR: Condition "!FileAccess::exists(path)" is true. Returning: ERR_FILE_NOT_FOUND
at: open_dynamic_library (drivers/unix/os_unix.cpp:1061)
ERROR: GDExtension dynamic library not found: 'res://bin/example.gdextension'.
at: open_library (core/extension/gdextension.cpp:740)
ERROR: Error loading extension: 'res://bin/example.gdextension'.
To fix I had to add the lib prefix explicitly to the libname variable in the cmake lists file or edit the gdextnsions file to omit the lib prefix in the library name.
not sure if related to #38 or #107 ?
Edit:
Here's a screenshot in case it's unclear what I mean. At the top is the library file that is generated, and at the bottom the gdextension file. Note the library generated lacks the lib prefix that is present in the gdextension file for each of the library file names.
- 主要语言
- Python
- 星标
- 499
- 派生
- 140
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
godotengine/godot-cpp-template 的其他 Issue
-
.DS_Store incorrectly labelled in .gitignore可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 1/5 1 小时以内 新手友好度 78/100
-
bug
难度 3/5 1-2 天 新手友好度 55/100
godotengine/godot-cpp-template#116 · 2 条评论 ·
-
bug
难度 3/5 1-2 天 新手友好度 45/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 55/100
godotengine/godot-cpp-template#71 · 1 个 reaction ·
-
bug
难度 3/5 1-2 天 新手友好度 35/100
godotengine/godot-cpp-template#41 · 4 条评论 ·
查看 godotengine/godot-cpp-template 的全部 Issue
相似的 Issue
-
needs-triage
难度 1/5 1-3 小时 新手友好度 85/100
gke-labs/kube-agents#6620 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
open-webui/open-webui#34719 · 2 条评论 ·
维护者通常 1 天内回复
-
cognition
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
One non-object JSON record makes the session catalog exit可能已有人在做 @he-yufeng 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 78/100
collabnix/awesome-mcp-lists#433 ·
维护者通常 4 天内回复