d2mcpp icon indicating copy to clipboard operation
d2mcpp copied to clipboard

怎么设置c++标准?

Open xflcx1991 opened this issue 1 year ago • 2 comments

通过打印__cplusplus的值,我发现标准是c++11,如何指定本地编译链,指定 c++标准?

我知道xling依赖了xmake,应该有便捷入口调整

xflcx1991 avatar Jul 07 '25 16:07 xflcx1991

找到了, mcpp-standard/dslings/cpp11/xmake.lua

else
    set_languages("cxx11")
end

改成 cxx17即可

xflcx1991 avatar Jul 07 '25 16:07 xflcx1991

设置c++11是为了模拟标准环境

Sunrisepeak avatar Jul 07 '25 17:07 Sunrisepeak