Folder Setup - Path With '-' character

Dear Sirs

I have an ARM project on followind folder
D:\Firmware\APIDM01\B - Releases\V1\A - Source

When a I use the default folder filled by UV3 on folders path of compiler, I have the follwing path

..\A - Source

It cause an error when compilling the source code.

MAIN.C: Error: C3078E: stdin ('-') combined with other files

I suppose because the PARSER of compiler. I didn't find
this error using C51 8.12 compiler.

LEt's See the string control

-c --device DARMP -g -O0 --apcs=interwork -I..\A - Source -I "C:\Keil MDK 3.20\ARM\INC\Philips" -o "*.o" --omf_browse "*.crf" --depend "*.d"

-I..\A - Source <--- IT's parsing error

So, on folder path I've change the files path to
"D:\Firmware\APIDM01\B - Releases\V1\A - Source"
and the project compiles normally....

Let's see the final string control

-c --device DARMP -g -O0 --apcs=interwork -I"D:\Firmware\APIDM01\B - Releases\V1\A - Source" -I "C:\Keil MDK 3.20\ARM\INC\Philips" -o "*.o" --omf_browse "*.crf" --depend "*.d"

Is it a parser compiler bug or I can't use '-' char on ppath of my folders ?

Regards.

Parents
  • Parser?

    The compiler parser is the little guy who understands the C or C++ source code.

    This is a question about how the IDE (not the compiler) supports a path that contains a space.

    Do avoid to use a path with spaces.

    This is a common problem with almost all command-line tools - or at least with the tools who creates the command-lines, without specifying quotation marks around the path, or embedding break characters before problematic characters.

    But no: This has nothing to do with the compiler parser. And it isn't the '-' that is the problem, but the spaces.

    If you think about it - it is totally impossible for a command line tool to know if a space on the command line represents the separation between two options, or if it is part of a command.

    The Win32 command-line do cheat a bit. If you run a built-in command that can only take a single file name (for example CD) then it assumes that a space in the middle is part of the file name. M$ thought this was clever, but it can in some situations be dangerous. Tools should not perform arbitrary guesses.

Reply
  • Parser?

    The compiler parser is the little guy who understands the C or C++ source code.

    This is a question about how the IDE (not the compiler) supports a path that contains a space.

    Do avoid to use a path with spaces.

    This is a common problem with almost all command-line tools - or at least with the tools who creates the command-lines, without specifying quotation marks around the path, or embedding break characters before problematic characters.

    But no: This has nothing to do with the compiler parser. And it isn't the '-' that is the problem, but the spaces.

    If you think about it - it is totally impossible for a command line tool to know if a space on the command line represents the separation between two options, or if it is part of a command.

    The Win32 command-line do cheat a bit. If you run a built-in command that can only take a single file name (for example CD) then it assumes that a space in the middle is part of the file name. M$ thought this was clever, but it can in some situations be dangerous. Tools should not perform arbitrary guesses.

Children
More questions in this forum