|
-
May 10th, 2008, 12:21 PM
#6
Re: Post-build event command line is screwy; only one argument passed to the app?
 Originally Posted by cjard
I think i just worked it out...
$(TargetDir) ends with a trailing slash for ?convenience?
But this trailing slash seems to be escaping the next quote, meaning that ?DOS? is thinking the call to:
ListArgs.exe "C:\windows\"
is one argument of: c:\windows"
This is nearly the stupidest thing i've ever seen.. how to work around that?
That is correct, it is one of the most "unusual" situations, and causes lots of people to get confused. Howere it is much more common to use the path in conjunction with a file name. If the "\" was not there, then everyone else would have to add it.
The best solution, if you really want to pass the path (and are not using it to build a FILE specification, it to simply append a ".".
This is fairly self documenting as "I want the current directory pointed to by the Target Directory".
So
Code:
$(TargetDir).
$(TargetDir)..
$(TargetDir)NewFileName
$(TargetDir)($OtherParam)
....
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|