I have tried it. But no, it does do the trick: one can not escape spaces with backslashes for include paths...<br><br>Here is my test command to see if windres accepts to escape spaces with backslashes.<br><br>$ cd &quot;/C/Program Files/VTK 5.10.0/bin/Wrapping/Python&quot; &amp;&amp; /C/MinGW/bin/windres.exe  -O coff -I&quot;/C/Program\ Files/VTK\ 5.10.0/bin&quot;  -DVTK_IN_VTK &quot;/C/Program Files/VTK 5.10.0/Wrapping/Python/vtkpython.rc&quot; CMakeFiles/vtkpython.dir/vtkpython.rc.obj<br>
gcc: erreur: Files/VTK/\: No such file or directory<br>gcc: erreur: 5.10.0/bin: No such file or directory<br>c:\MinGW\bin\windres.exe: preprocessing failed.<br><br><br>Now, that everything compiled fine, I just realized that I have another problem:<br>
Most test programs that have been compiled are linked to MatLab libraries and requires access to MatLab libraries.<br>Most of them reports a missing entry point in MatLab libraries.<br>I suppose that MatLab was not compiled with gcc but MSVC. Another source of problems<br>
I just turn off the VTK MatLab and start the compilation process again...<br>I think I will have to do the magic trick again for my include paths...<br><br>Guillaume<br><br><br><div class="gmail_quote">2012/6/6 David Gobbi <span dir="ltr">&lt;<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Guillaume,<br>
<br>
Will windres accept the spaces if you escape them with backslashes?<br>
E.g.:<br>
<br>
-I&quot;/C/Program\ Files/VTK\ 5.10.0/bin&quot;<br>
<span class="HOEnZb"><font color="#888888"><br>
 - David<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On Wed, Jun 6, 2012 at 10:58 AM, Guillaume Jacquenot<br>
&lt;<a href="mailto:guillaume.jacquenot@gmail.com">guillaume.jacquenot@gmail.com</a>&gt; wrote:<br>
&gt; Dear all,<br>
&gt;<br>
&gt; I would to build the VTK Python libraries on Win XP 32 bits with MinGW.<br>
&gt; I have configured cmake to provide the python wrapping libraries<br>
&gt;<br>
&gt; A problem arises with target vtkpython:<br>
&gt; A gcc preprocessing called by program windres reports errors.<br>
&gt; Apparently the gcc program  does not support spaces for my include paths,<br>
&gt; that are contained in my VTK source path<br>
&gt; Other people have reported this bug on internet, but no good workarounds was<br>
&gt; provided.<br>
&gt;<br>
&gt; I have found a manual workaround to do the trick (explained below)<br>
&gt;<br>
&gt;<br>
&gt; My configuration<br>
&gt; - VTK 5.10.0<br>
&gt; - Win XP 32<br>
&gt; - MinGW G++ 4.6.2<br>
&gt; - Python 2.7.2<br>
&gt; - Path to VTK source directory: C:\Program Files\VTK 5.10.0 : Source of my<br>
&gt; problem!<br>
&gt;<br>
&gt; I have identified the problem with the command<br>
&gt; make -n vtkpython<br>
&gt;<br>
&gt; Here is the command that fails because of spaces in the include paths<br>
&gt; (I voluntary suppress all the -I&quot;vtk_diretories&quot;, I just kept once to<br>
&gt; produce only one error)<br>
&gt;<br>
&gt; cd &quot;/C/Program Files/VTK 5.10.0/bin/Wrapping/Python&quot; &amp;&amp;<br>
&gt; /C/MinGW/bin/windres.exe  -O coff -I&quot;/C/Program Files/VTK 5.10.0/bin&quot;<br>
&gt; -DVTK_IN_VTK &quot;/C/Program Files/VTK 5.10.0/Wrapping/Python/vtkpython.rc&quot; CMak<br>
&gt; eFiles/vtkpython.dir/vtkpython.rc.obj<br>
&gt; gcc: erreur: Files/VTK\: No such file or directory<br>
&gt; gcc: erreur: 5.10.0/bin: No such file or directory<br>
&gt; c:\MinGW\bin\windres.exe: preprocessing failed.<br>
&gt;<br>
&gt; Here is the version of windres I use<br>
&gt;<br>
&gt; jacquenot@PC-GJ /C/Program Files/VTK 5.10.0/bin/Wrapping/Python<br>
&gt; $ windres --version<br>
&gt; GNU windres (GNU Binutils) 2.21.53.20110804<br>
&gt; Copyright 2011 Free Software Foundation, Inc.<br>
&gt;<br>
&gt;<br>
&gt; Solutions:<br>
&gt;<br>
&gt; 1)<br>
&gt; A solution that can work is to replace &quot;Program Files&quot; with &quot;Program~1&quot; and<br>
&gt; &quot;VTK 5.10.0&quot; with &quot;VTK~2&quot;<br>
&gt; The ~2 is because I have also a directory named VTK 5.8.0<br>
&gt; This requires to replace the directory names with Windows naming conventions<br>
&gt; and to have access to the directories to content to find the correct index<br>
&gt; (~1 or ~2,...)<br>
&gt;<br>
&gt; The following command works (does not produce error)<br>
&gt; cd &quot;/C/Program Files/VTK 5.10.0/bin/Wrapping/Python&quot; &amp;&amp;<br>
&gt; /C/MinGW/bin/windres.exe  -O coff -I&quot;/c/Program~1/VTK~2/bin&quot; -DVTK_IN_VTK<br>
&gt; &quot;/C/Program Files/VTK 5.10.0/Wrapping/Pyt<br>
&gt; hon/vtkpython.rc&quot; CMakeFiles/vtkpython.dir/vtkpython.rc.obj<br>
&gt;<br>
&gt;<br>
&gt; 2)<br>
&gt; One solution would be to relocate VTK to a path without spaces.<br>
&gt;<br>
&gt; 3)<br>
&gt; Is there another workaround? This first solution is annoying...<br>
&gt;<br>
&gt;<br>
&gt; What I finally did:<br>
&gt; I generated the command that failed with<br>
&gt; make -n vtkpython<br>
&gt; I extracted the line command with windres program in my favorite text editor<br>
&gt; I manually replaced &quot;Program Files&quot; with &quot;Program~1&quot; and &quot;VTK 5.10.0&quot; with<br>
&gt; &quot;VTK~2&quot;<br>
&gt; I executed that command successfully<br>
&gt; I ran make again. vtkpython is successfully generated<br>
&gt;<br>
&gt; Can someone explain to me what is the resource compiler windres used for?<br>
&gt;<br>
&gt; Guillaume<br>
&gt;<br>
&gt;<br>
&gt; Below is my ugly command<br>
&gt;<br>
&gt; $ cd &quot;/C/Program Files/VTK 5.10.0/bin/Wrapping/Python&quot; &amp;&amp;<br>
&gt; /C/MinGW/bin/windres.exe  -O coff -I&quot;/C/Program~1/VTK~2/bin&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/bin/Common&quot; -I&quot;/C/Program~1/VTK~2/bin/Utilit<br>
&gt; ies&quot; -I&quot;/C/Program~1/VTK~2/bin/VolumeRendering&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/bin/Rendering&quot; -I&quot;/C/Program~1/VTK~2/bin/Charts&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/bin/Chemistry&quot; -I&quot;/C/Program~1/VTK~2/bin/Uti<br>
&gt; lities/vtkalglib&quot; -I&quot;/C/Program~1/VTK~2/Wrapping/Python&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/bin/Wrapping/Python&quot; -I&quot;/C/Program~1/VTK~2/Infovis&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/Geovis&quot; -I&quot;/C/Program~1/VTK~2/Vi<br>
&gt; ews&quot; -I&quot;/C/Program~1/VTK~2/VolumeRendering&quot; -I&quot;/C/Program~1/VTK~2/Hybrid&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/Widgets&quot; -I&quot;/C/Program~1/VTK~2/Rendering&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/Charts&quot; -I&quot;/C/Program~1/V<br>
&gt; TK~2/Chemistry&quot; -I&quot;/C/Program~1/VTK~2/Rendering/Testing/Cxx&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/IO&quot; -I&quot;/C/Program~1/VTK~2/Imaging&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/Graphics&quot; -I&quot;/C/Program~1/VTK~2/GenericFilter<br>
&gt; ing&quot; -I&quot;/C/Program~1/VTK~2/Filtering&quot; -I&quot;/C/Program~1/VTK~2/Common&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/Utilities&quot; -I&quot;/C/Program~1/VTK~2/Common/Testing/Cxx&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/bin/Utilities/vtknet<br>
&gt; cdf/include&quot; -I&quot;/C/Program~1/VTK~2/Utilities/vtknetcdf/include&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/bin/Utilities/vtklibproj4&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/Utilities/vtklibproj4&quot; -I&quot;/C/Program~1/VTK~2/bin/U<br>
&gt; tilities/DICOMParser&quot; -I&quot;/C/Program~1/VTK~2/Utilities/DICOMParser&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/bin/Utilities/vtkfreetype/include&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/Utilities/vtkfreetype/include&quot; -I&quot;/C/Pr<br>
&gt; ogram~1/VTK~2/bin/Utilities/LSDyna&quot; -I&quot;/C/Program~1/VTK~2/Utilities/LSDyna&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/bin/Utilities/MaterialLibrary&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/Utilities/MaterialLibrary&quot; -I&quot;/C/P<br>
&gt; rogram~1/VTK~2/bin/Utilities/vtkmetaio&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/Utilities/vtkmetaio&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/bin/Utilities/verdict&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/Utilities/verdict&quot; -I&quot;/C/Program~1/<br>
&gt; VTK~2/bin/Utilities/vtkhdf5&quot; -I&quot;/C/Program~1/VTK~2/Utilities/vtkhdf5&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/bin/Utilities/vtkhdf5/src&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/Utilities/vtkhdf5/src&quot; -I&quot;/C/Program~1/VTK~2<br>
&gt; /bin/Utilities/vtkhdf5/hl/src&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/Utilities/vtkhdf5/hl/src&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/Utilities/utf8/source&quot;<br>
&gt; -I&quot;/C/Program~1/VTK~2/Utilities/vtkalglib&quot; -I&quot;/C/Program~1/VT<br>
&gt; K~2/Utilities/ftgl/src&quot; -I&quot;/C/Program~1/VTK~2/bin/Utilities/ftgl&quot;<br>
&gt; -I&quot;/C/Program~1/R/R-2.15.0/include&quot; -I&quot;/C/Program~1/Python27/include&quot;<br>
&gt; -I&quot;/C/Program~1/MATLAB/R2012a/extern/include&quot;<br>
&gt; -DVTK_IN_VTK &quot;/C/Program Files/VTK 5.10.0/Wrapping/Python/vtkpython.rc&quot;<br>
&gt; CMakeFiles/vtkpython.dir/vtkpython.rc.obj<br>
</div></div></blockquote></div><br>