1

I've tried to compile an application with Directx. But this causes an PRJ0030 error for $(). How can I escape critical characters like (,) or blanks. Refering to the cmd I've used ^ but it does not help.

ThinkingStiff
  • 64,767
  • 30
  • 146
  • 239
Gerrit
  • 641
  • 1
  • 5
  • 19

2 Answers2

1
AdditionalLibraryDirectories=""$(DIRECTX_ROOT)\Lib\x86""

&quot should not be there. $(DIRECTX_ROOT) requires the macro to be set in a project property sheet. You are better off spelling it out:

AdditionalLibraryDirectories="c:\blah\dx9\Lib\x86"
Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • Unfortunately I need to do it this way, cause we would like to set the path with enviroment variables. Without the &qout; it gives me this compiler line: /I "C:\Program Files (x86)\Microsoft DirectX SDK (March 2009)"\Include But the same error occurs. – Gerrit Mar 22 '10 at 12:49
  • Looks about right. There is however a mis-placed double-quote there, before the \Include. Check the environment variable value. You've also mysteriously switched for Lib to Include. – Hans Passant Mar 22 '10 at 13:20
  • The lib / include was a copy&paste error, but nevertheless the problem is the same. Indeed I've qouted my enviroment variable, cause I've tried to get it work like this, but even without double-quotes it does not work. – Gerrit Mar 22 '10 at 13:36
  • @Esco: I'm kinda lost right now with copy/paste errors and quotes in random places. Open the Buildlog.htm file and copy the cl.exe command line you see there into your question so we know what it *really* looks like. – Hans Passant Mar 22 '10 at 14:49
0

cmd.exe unfortunately isn't a proper shell like bash, and parsing the command line is up to each individual program. I can't speak for devenv.exe but a common convention is to surround troublesome strings with double quotes (").

Hugh Allen
  • 6,509
  • 1
  • 34
  • 44
  • I've tried to use the quotes like this: [...] AdditionalLibraryDirectories=""$(DIRECTX_ROOT)\Lib\x86"" [...] But it does not seem to work. Also double quotes in the variable does not help. – Gerrit Mar 22 '10 at 10:03