set_project("EasyMusic")
set_xmakever("2.8.3")
set_allowedplats("windows")
set_allowedmodes("debug", "release")
set_languages("c++20")
set_warnings("all")
add_rules("mode.debug", "mode.release")
set_encodings("source:utf-8")
add_requires("stb", "cpr", "yyjson")
if is_mode("release") and is_plat("windows") then
add_requires("vc-ltl5")
end
target("EasyMusic")
set_kind("binary")
add_files("*.cpp")
if is_plat("windows") then
add_syslinks("gdi32", "dwmapi")
end
add_packages("stb", "cpr", "yyjson")
if is_mode("release") and is_plat("windows") then
add_packages("vc-ltl5")
end
使用之前需要把 myhead.h 里的 #pragma comment 全部注释掉。
并确保你的电脑正确安装了 VS 2022。
这里写了一个简单
xmake.lua
文件,可以直接编译当前项目。使用之前需要把
myhead.h
里的#pragma comment
全部注释掉。 并确保你的电脑正确安装了 VS 2022。操作: