Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vs2022 tbox 1.7.5 xmake编译报错 #263

Closed
edidada opened this issue Aug 30, 2024 · 5 comments
Closed

vs2022 tbox 1.7.5 xmake编译报错 #263

edidada opened this issue Aug 30, 2024 · 5 comments

Comments

@edidada
Copy link

edidada commented Aug 30, 2024

注:提问题时若使用不能用/没效果/有问题/报错此类模糊表达,但又没有根据下面的模板给出任何相关辅助信息的,将绝对不会有任何反馈。

描述问题

error: log2f.c
src\tbox\libm\log2f.c(45): error C2220: 以下警告被视为错误

in src\tbox\libm\log2f.c

期待的结果

xmake编译成功

错误信息

如果可能,请尽量附加程序运行过程中的错误输出信息。

相关环境

请提供编译和运行环境信息。

其他信息

请提供其他附加信息帮助我们诊断问题。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: vs2022 tbox 1.7.5 xmake compilation error

Note: If you use vague expressions such as `not working/no effect/problem/error' when asking a question, but do not provide any relevant auxiliary information according to the template below, there will be absolutely no feedback.

Describe the problem

error: log2f.c
src\tbox\libm\log2f.c(45): error C2220: The following warning is considered an error

in src\tbox\libm\log2f.c

Expected results

xmake compiled successfully

error message

If possible, please try to attach error output information during the running of the program.

Related environment

Please provide compilation and running environment information.

Other information

Please provide any additional information to help us diagnose the issue.

@waruqi
Copy link
Member

waruqi commented Aug 30, 2024

xmake.lua 里 error 警告关了

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


The error warning in xmake.lua is turned off

@edidada
Copy link
Author

edidada commented Aug 30, 2024

怎么关闭xmake.lua的警告?

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

if is_plat("windows") then
    add_cflags("/W0", {force = true})
    -- add_cxxflags("/W0", {force = true}) -- 如果是C++代码
else
    add_cflags("-w")
    -- add_cxxflags("-w") -- 如果是C++代码
end

target("your_target_name")
    set_kind("binary")
    add_files("src/*.c")

chatgpt 的回复?

@waruqi
Copy link
Member

waruqi commented Aug 30, 2024

tbox/xmake.lua

Line 11 in 553c324

set_warnings("all", "error")

@edidada edidada closed this as completed Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants