Skip to content

xmake 在 Debian12 和 RockyLinux8.10 编译 SDL2 程序异常 #8163

@ZhengQuancheng

Description

@ZhengQuancheng

Xmake 版本

3.0.2

操作系统版本和架构

Debian12 和 RockyLinux8.10

描述问题

xmake 在 Debian12 和 RockyLinux8.10 编译 SDL2 程序异常,程序一直卡住,不显示 SDL2 窗口。当我安装系统的SDL开发软件包,删除 ~/.xmake 目录,重新通过xmake编译安装 SDL2,程序便可正常运行,我猜测是因为通过 xmake 安装的依赖不满足 SDL2 的运行。

期待的结果

应该正常出现 SDL2 图形窗口

工程配置

add_rules("mode.debug", "mode.release")

add_requires("cjson")
add_requires("libsdl2", "libsdl2_image", "libsdl2_mixer", "libsdl2_ttf", "libsdl2_gfx")
add_requires("imgui", {configs = {sdl2 = true}})

target("game")
    set_kind("binary")
    add_files("game/*.cpp")
    add_packages("cjson", "libsdl2", "libsdl2_image", "libsdl2_mixer", "libsdl2_ttf", "libsdl2_gfx")

target("editor")
    set_kind("binary")
    add_files("editor/*.cpp")
    add_packages("libsdl2", "imgui")

附加信息和错误日志

可正常编译 SDL2 程序,但是无法正常运行

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions