<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Folder Setup - Path With &amp;#39;-&amp;#39; character</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/24178/folder-setup---path-with---character</link><description> 
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</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Folder Setup - Path With '-' character</title><link>https://community.arm.com/thread/124835?ContentTypeID=1</link><pubDate>Sat, 26 Jul 2008 15:00:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:de8ff02e-4946-4675-9a9b-792b2005c420</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Just a footnote, since you are not so comfortable with command
lines.&lt;/p&gt;

&lt;p&gt;
Quote a lot of programs have a special meaning for a command line
parameter that consists of a single dash.&lt;/p&gt;

&lt;p&gt;
It normally means that the program should read from stdin or
should write to stdout.&lt;/p&gt;

&lt;p&gt;
That is probably the reason why you get the strange error message.
When processing a file, the compiler can specify a file name and line
number. That isn&amp;#39;t so easy when it is requested to read from
stdin.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Folder Setup - Path With '-' character</title><link>https://community.arm.com/thread/114130?ContentTypeID=1</link><pubDate>Sat, 26 Jul 2008 14:45:51 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:088a3fd9-4f0f-4a16-8b57-2092e603896f</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
You still haven&amp;#39;t realized how a command line works.&lt;/p&gt;

&lt;p&gt;
Your first example (that gave an error) will split into the
following (by windows itself):&lt;/p&gt;

&lt;pre&gt;
1: -c
2: --device
3: DARMP
4: -g
5: -O0
6: --apcs=interwork
7: -I..\A
8: -
9: Source
10: -I
11: C:\Keil MDK 3.20\ARM\INC\Philips
12: -o
13: *.o
14: --omf_browse
15: *.crf
16: --depend
17: *.d
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
And as you can see, your path &amp;quot;..\A - Source&amp;quot; gets splitted into
three parameters. Not by the Keil compiler, but the Windows. The same
thing would happen if the command line was processed on a Unix
system.&lt;/p&gt;

&lt;p&gt;
Your second example - after you have added quotation marks - gets
expanded into:&lt;/p&gt;

&lt;pre&gt;
1: -c
2: --device
3: DARMP
4: -g
5: -O0
6: --apcs=interwork
7: -ID:\Firmware\APIDM01\B - Releases\V1\A - Source
8: -I
9: C:\Keil MDK 3.20\ARM\INC\Philips
10: -o
11: *.o
12: --omf_browse
13: *.crf
14: --depend
15: *.d
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
And in this case, the compiler will get the include path as a single
parameter.&lt;/p&gt;

&lt;p&gt;
Then you make a new post, where you compare with the C51
environment. But we never get to know if the data is sent to the
compiler on a command line, or by the use of a file. C51 is old, and
a lot of Windows-based IDE made use of parameter files to get around
the short command line supported by MS-DOS and early versions of
Windows.&lt;/p&gt;

&lt;p&gt;
However, note that the path is bracketed:&lt;/p&gt;

&lt;pre&gt;
INCDIR(..\A - Source)
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
In this case, the compiler can use this bracketing to handle a path
with spaces.&lt;/p&gt;

&lt;p&gt;
So, once more: Your problem is with spaces, not with the &amp;#39;-&amp;#39;
character. And as soon as you make sure that any path containing
spaces are put within quotation marks, the operating system - not the
compiler - will stop splitting the path into multiple parameters.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Folder Setup - Path With '-' character</title><link>https://community.arm.com/thread/100935?ContentTypeID=1</link><pubDate>Sat, 26 Jul 2008 10:49:14 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:71ef9ffe-f286-4528-8cfc-947be4021f18</guid><dc:creator>Jean Fernandes</dc:creator><description>&lt;p&gt;&lt;p&gt;
I&amp;#39;ve open one C51 project.&lt;br /&gt;
(uV3 3.6)&lt;/p&gt;

&lt;p&gt;
Let&amp;#39;s observe how String Control is mounted.&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
LARGE OPTIMIZE (9,SPEED) BROWSE ORDER INCDIR(..\A - Source) DEBUG
OBJECTEXTEND CODE LISTINCLUDE SYMBOLS TABS (2)&lt;br /&gt;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
:)&lt;/p&gt;

&lt;p&gt;
So...the INCDIR (PATH) ...options has spaces and &amp;#39;-&amp;#39; char... no
problem....&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Folder Setup - Path With '-' character</title><link>https://community.arm.com/thread/76532?ContentTypeID=1</link><pubDate>Sat, 26 Jul 2008 10:42:36 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c4d6bd99-14b3-4c03-8fb2-e62166956071</guid><dc:creator>Jean Fernandes</dc:creator><description>&lt;p&gt;&lt;p&gt;
Sorry about parse mistake.&lt;/p&gt;

&lt;p&gt;
You&amp;#39;re sure. The problem is about Uvision parse (that read command
line) routine.&lt;/p&gt;

&lt;p&gt;
But on Uvision on 8.12 C51 distribution runs perfectly with the
same folder framework. I believe that problem is on MDK ARM Uvision
release (3.20).&lt;/p&gt;

&lt;p&gt;
Regards&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Folder Setup - Path With '-' character</title><link>https://community.arm.com/thread/52114?ContentTypeID=1</link><pubDate>Sat, 26 Jul 2008 07:45:38 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:252af0d0-84c6-41f1-8934-16421f722aa1</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Parser?&lt;/p&gt;

&lt;p&gt;
The compiler parser is the little guy who understands the C or C++
source code.&lt;/p&gt;

&lt;p&gt;
This is a question about how the IDE (not the compiler) supports a
path that contains a space.&lt;/p&gt;

&lt;p&gt;
Do avoid to use a path with spaces.&lt;/p&gt;

&lt;p&gt;
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.&lt;/p&gt;

&lt;p&gt;
But no: This has nothing to do with the compiler parser. And it
isn&amp;#39;t the &amp;#39;-&amp;#39; that is the problem, but the spaces.&lt;/p&gt;

&lt;p&gt;
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.&lt;/p&gt;

&lt;p&gt;
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.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>