Trouble with Filenames With a Dollar Sign ($) in Inline FilesLast reviewed: July 17, 1997Article ID: Q59409 |
1.01 1.11 1.12 1.13 1.20 1.30 1.40 | 1.11 1.12 1.13 1.21
MS-DOS | OS/2kbtool kberrmsg The information in this article applies to:
SUMMARYIf you use a filename that contains a dollar sign ($) in a NMAKE description file, you can use the escape character (^) to tell NMAKE that the dollar sign is part of your filename, not a macro character. However, to use the dollar sign in an inline response file or as a literal character in a command, use two dollar signs ($$) instead.
MORE INFORMATIONConsider the following NMAKE description file:
all:test^$.exe
test^$.obj: test^$.c
cl /c test^$.c
test^$.exe: test^$.obj
link @<<
test^$.obj,
test^$.exe,
NUL,;
<<
In this file, the escape character (^) is used to tell NMAKE that the
$ is part of the filename TEST$.* and does not denote a macro. When
TEST$.C is compiled, everything works correctly. However, the inline
response file for LINK does not work as expected. NMAKE does not
interpret the ^ character, but instead passes it on to LINK.EXE. LINK
then tries to link TEST^$.OBJ instead of TEST$.OBJ and fails. If you
eliminate the ^ to pass TEST$.OBJ to link, NMAKE fails. NMAKE version
1.4 generates the following error:
U1002: syntax error: invalid macro invocation '$'The following presents two methods to work around this situation:
|
Additional reference words: kbinf kbinf 1.20 1.30 1.40
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |