This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

cmake tool(arm-none-eabi-gcc) compile C++ code, report as.exe: CreateProcess: No such file or directory

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.obj
D:\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.cpp
arm-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 directory
compilation 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?

Parents
  • Hello,

    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.:

    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


    I note that this part of the path is self-cancelling.

    bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../

    Based on the path to the g++ executable:

    D:\Project\mcu\prebuilts\gcc\windows\gcc-arm-none-eabi-10-2020-q4-major\bin\arm-none-eabi-g++.exe

    The specified path looks correct. Can you verify that as.exe does exist in the folder, and is executable:

    D:\Project\mcu\prebuilts\gcc\windows\gcc-arm-none-eabi-10-2020-q4-major\arm-none-eabi\bin\

    Regards, Ronan

Reply
  • Hello,

    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.:

    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


    I note that this part of the path is self-cancelling.

    bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../

    Based on the path to the g++ executable:

    D:\Project\mcu\prebuilts\gcc\windows\gcc-arm-none-eabi-10-2020-q4-major\bin\arm-none-eabi-g++.exe

    The specified path looks correct. Can you verify that as.exe does exist in the folder, and is executable:

    D:\Project\mcu\prebuilts\gcc\windows\gcc-arm-none-eabi-10-2020-q4-major\arm-none-eabi\bin\

    Regards, Ronan

Children