Error[Pe142]: expression must have pointer-to-object type F:\技术研发\program\test\Modbus Phone V01\User\main.c 89
时间: 2023-09-23 18:10:53 浏览: 171
This error message means that a non-pointer type variable or expression is being used where a pointer type is expected.
In this specific case, the error is occurring on line 89 of the main.c file in the Modbus Phone V01 project. The code on that line is likely attempting to use a variable or expression as a pointer, but that variable or expression is not actually a pointer type.
To fix this error, the code needs to be modified so that it uses a pointer type where appropriate. This could involve changing the type of a variable, or using the "&" operator to get the address of a variable to use as a pointer.
相关问题
lkuser@ubuntu:~/SDK/Hi3519DV500_SDK_V2.0.0.2/smp/a55_linux/source/bsp$ make all dirname: missing operand Try 'dirname --help' for more information. dirname: missing operand Try 'dirname --help' for more information. make: aarch64-v01c01-linux-musl-gcc: Command not found Makefile:234: "---------------------------------------------------------------------" Makefile:235: " < !!! Attention:please check toolchain version !!! > " Makefile:236: " The current toolchain version is " Makefile:237: " But requested toolchain version is (ver100.070)" Makefile:238: " Please make sure the toolchain version is the best match " Makefile:239: "---------------------------------------------------------------------" Press Enter to continue compile; Ctrl + C to stop it !!什么意思
这个错误提示显示了在执行 make all 命令时出现了一些问题。其中的错误信息有:
- dirname: missing operand:缺少操作数,可能是由于没有指定需要处理的目录或文件名。
- aarch64-v01c01-linux-musl-gcc: Command not found:找不到 aarch64-v01c01-linux-musl-gcc 命令,可能是由于没有正确安装交叉编译工具链。
此外,Makefile 中还有一些提示信息,提醒你检查工具链版本是否正确。最后,按下 Enter 键可以继续编译,按下 Ctrl+C 键可以停止编译。建议你检查代码和配置,确保编译环境正确配置,并且工具链版本正确匹配。
cess to XMLHttpRequest at 'https://smartuw-hl14uw-sit.health.cpic.com/smart-uw/preview&questionnaireCode=WJ00077&version=V01&token=&channel=15' from origin 'http://localhost:8111' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. 这个报错大致是什么意思
这个错误是由浏览器的CORS策略引起的。CORS(跨域资源共享)是一种浏览器安全机制,用于限制跨域请求的访问权限。
在你的情况下,你正在尝试从"localhost:8111"这个源(origin)发送一个跨域请求到"https://smartuw-hl14uw-sit.health.cpic.com"。然而,目标服务器未返回必需的CORS响应头,导致浏览器拒绝该跨域请求。
具体来说,报错信息中提到了"Access-Control-Allow-Origin"响应头缺失。这个响应头用于指示服务器允许哪些源(origin)访问资源。在没有正确配置CORS的情况下,浏览器会阻止跨域请求,并抛出这个错误。
要解决这个问题,你需要在目标服务器上配置CORS策略,确保在响应中包含正确的"Access-Control-Allow-Origin"头。可以尝试将该头设置为允许访问的源,如"http://localhost:8111"。
另外,还可以在服务器端设置其他CORS响应头,如"Access-Control-Allow-Methods"和"Access-Control-Allow-Headers",以进一步细化跨域请求的访问控制。
请注意,配置CORS策略可能需要对目标服务器进行更改,因此可能需要与服务器管理员或开发团队合作来解决这个问题。
阅读全文