This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ArmClang error (cannot specify -o)

Hello,

I am trying to move from ARM Compiler v5.06 to v6.4, but I encounter an error, which I cannot handle.

The project builds fine with v5.06. When changing to v6.4 in Keil µVision and hitting build, the following error pops up for every source file in the project:

ArmClang.exe: error: cannot specify -o when generating multiple output files

Looking at Project -> Options -> C/C++, I can see "-o" in compiler control string, but I can't do anything to make it disappear.

Any help would be appreciated. Tamas

  • OK,

    I dived a bit deeper into with what arguments µVision calls the ArmClang.exe.

    I don't know why, but if the last specified include directory in µVision was "..\Modules", then one of the arguments of ArmClang.exe became -main-file-name "Modules", instead of -I "..\Modules". I believe that this has lead to the error.

    If I move the "..\Modules" in µVision's list of included directories more towards the beginning of the list, ArmClangs's argument becomes -main-file-name "myModesMode3.c", which is correct in my case and the compilation goes on.

    I can reproduce this behavior, but cannot explain it. This may be a bug in the µVision IDE (v5.20.0.0).

Related