Open Sunrisepeak opened 4 months ago
Bot detected the issue body's language is not English, translate it automatically.
Title: imgui-scaffold: Using xmake to compile projects that depend on imgui lacks opengl Related header file links
2.8.7
Ubuntu22.04
Newly installed ubuntu22.04, after configuring the following environment, there is a problem when compiling the example imgui-scaffold https://github.com/xmake-examples/imgui-scaffold
sudo add-apt-repository ppa:xmake-io/xmake
sudo apt-get update
sudo apt-get install g++ gdb xmake make git -y
imgui-scaffold
https://github.com/xmake-examples/imgui-scaffold
Currently, mesa-common-dev is installed and can be compiled normally by adding add_links("GL") to xmake.lua
sudo apt-get install mesa-common-dev
The possible reason is that glfw does not add gl link?
The config in imgui-scaffold seems deprecated, maybe enable this config and try again?
The config in imgui-scaffold seems deprecated, maybe enable this config and try again?
the glfw_opengl3
configs is kept for backwards compatibility, script auto config 'glfw' & 'opengl3' in L86 of xmake.lua
add_requires("imgui 1.88", {configs = {glfw_opengl3 = true}})
its more of a link issue
Xmake 版本
2.8.7
操作系统版本和架构
Ubuntu22.04
描述问题
真实问题出现在 我自己的项目KHistory上(xmake.lua) 老电脑上使用 xmake v2.7.3可以正常构建,新安装的ubuntu22.04, 使用 xmake v2.8.7 会出现 opengl 相关的问题
最后发现编译 imgui-scaffold示例也会出现问题
期待的结果
imgui-scaffold 可以正常构建
工程配置
https://github.com/xmake-examples/imgui-scaffold
附加信息和错误日志
目前通过 安装mesa-common-dev, 并且在xmake.lua 中加 add_links("GL") 可以正常编译
可能的原因 glfw 没有加 gl链接吗?
https://github.com/xmake-io/xmake-repo/blob/0c965731a637a5f7fb4cab79cdb4397a302ee8d4/packages/g/glfw/xmake.lua#L35