I use cmake tool to compile(arm-none-eabi-gcc) project, but error reported when compiling c++ code (on Windows64);
Here is an example of my compile and result:
FAILED: product/wear/wear/CMakeFiles/uikit_gui.dir/__/__/__/ui/uikit/gui/src/applist/AppList.objD:\Project\mcu\prebuilts\gcc\windows\gcc-arm-none-eabi-10-2020-q4-major\bin\arm-none-eabi-g++.exe @product\wear\wear\CMakeFiles\uikit_gui.dir\__\__\__\ui\uikit\gui\src\applist\AppList.obj.rsp -MD -MT product/wear/wear/CMakeFiles/uikit_gui.dir/__/__/__/ui/uikit/gui/src/applist/AppList.obj -MF product\wear\wear\CMakeFiles\uikit_gui.dir\__\__\__\ui\uikit\gui\src\applist\AppList.obj.d -o product/wear/wear/CMakeFiles/uikit_gui.dir/__/__/__/ui/uikit/gui/src/applist/AppList.obj -c D:/Project/mcu/build/wear/application/ui/uikit/gui/src/applist/AppList.cpparm-none-eabi-g++.exe: fatal error: cannot execute 'd:/project/mcu/prebuilts/gcc/windows/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/as.exe': CreateProcess: No such file or directorycompilation terminated.
I guess it's because the file path is too long, but it's still report error after change file path.
1. what's the reason for this error?
Though the specified path to the assembler (as.exe that g++ is invoking) is long, it is less than 260 characters, so should be OK. The overall command line is very much less than 8K characters.:
Based on the path to the g++ executable:
The specified path looks correct. Can you verify that as.exe does exist in the folder, and is executable:
Thanks for your answer! I'm sure as.exe does exist in the folder. and some c++ files in other folder can be compiled correctly.
I found an explain from github, the defect mentioned in this link(github.com/.../13598) might be cause of this problem. do you know how to solve this problem?
I'm sorry, I can't reproduce, so can't explain why it is happening.