newline in constant error

在Unity开发过程中,遇到源文件包含中文字符串时出现的新line错误。通过使用记事本另存为UTF-8编码的方式解决了该问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

unity 中报错newline in constant error:源文件中有中文字符串,将源文件用记事本打开另存为utf-8格式。


*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\qianrushi.app\ARM\bianyiqi\Bin' compiling ds18b20.c... ds18b20.h(1): error: #77-D: this declaration has no storage class or type specifier *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\qianrushi.app\ARM\bianyiqi\Bin' ds18b20.h(1): error: #65: expected a ";" *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\qianrushi.app\ARM\bianyiqi\Bin' ds18b20.h(1): error: #26: too many characters in character constant *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\qianrushi.app\ARM\bianyiqi\Bin' ds18b20.h(1): warning: #192-D: unrecognized character escape sequence *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\qianrushi.app\ARM\bianyiqi\Bin' ds18b20.h(1): warning: #192-D: unrecognized character escape sequence *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\qianrushi.app\ARM\bianyiqi\Bin' ds18b20.h(1): warning: #192-D: unrecognized character escape sequence *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\qianrushi.app\ARM\bianyiqi\Bin' ds18b20.h(1): error: #26: too many characters in character constant *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\qianrushi.app\ARM\bianyiqi\Bin' ds18b20.h(3): error: #10: "#" not expected here ds18b20.c(67): error: #254: type name is not allowed ds18b20.h(5): error: #10: "#" not expected here ds18b20.c(67): error: #65: expected a ";" ds18b20.h(7): error: #10: "#" not expected here ds18b20.c(67): error: #20: identifier "i" is undefined ds18b20.h(9): error: #10: "#" not expected here ds18b20.c(99): error: #254: type name is not allowed ds18b20.h(11): error: #10: "#" not expected here ds18b20.c(99): error: #65: expected a ";" ds18b20.h(13): error: #10: "#" not expected here ds18b20.c(99): error: #20: identifier "i" is undefined ds18b20.h(15): error: #10: "#" not expected here ds18b20.c(181): error: #254: type name is not allowed ds18b20.h(17): error: #10: "#" not expected here ds18b20.c(181): error: #65: expected a ";" ds18b20.h(19): error: #10: "#" not expected here ds18b20.c(181): error: #20: identifier "i" is undefined ds18b20.h(22): warning: #1-D: last line of file ends without a newline "ds18b20.c" - 9 Error(s), 0 Warning(s). ds18b20.c(52): warning: #12-D: parsing restarts here after previous syntax error delay_us(400); ds18b20.c(53): error: #169: expected a declaration return 0; // ??? ds18b20.c(54): error: #169: expected a declaration } ds18b20.c(131): warning: #12-D: parsing restarts here after previous syntax error delay_us(55); // ?????? ds18b20.c(132): error: #169: expected a declaration } ds18b20.c(135): error: #169: expected a declaration } ds18b20.c(184): warning: #12-D: parsing restarts here after previous syntax error return temperature; ds18b20.c(185): error: #169: expected a declaration } ds18b20.c: 7 warnings, 18 errors "ds18b20.c" - 18 Error(s), 7 Warning(s).
最新发布
06-22
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值