Menu

#576 Visual Studio 2017 Project does not compile when path has spaces

Development_Branch
closed-fixed
nobody
None
2
2018-10-17
2018-10-16
Michael
No

For example ptlib is extracted to C:\path with spaces\ptlib...

Opening the Visual Studio projec ptlib_2017 and trying to compile the whole solution fails with:

C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): error MSB6006: "cmd.exe" exited with code 1.

The same builds fine when using a path without spaces.

I tried to search the documentation if there is a hint about this limitation, but did not find anything :-)

Discussion

  • Robert Jongbloed

    Any more info to give? That line tells me nothing as it is a Visual Studio system thing.

     
  • Michael

    Michael - 2018-10-16

    I did some more digging.

    This is without spaces:
    1> Written C:\Projekte\path\ptlib-a20bbb3d650cd17aff7d3e46e5d2e5d1a368bdf7\src\ptlib\msos../../../Lib/Win32/include/ptlib_config.h
    1> Configuration completed.
    1> Updating revision include file.
    1> git commit cannot be found
    1> C:\Projekte\path\ptlib-a20bbb3d650cd17aff7d3e46e5d2e5d1a368bdf7\revision.h.in
    1> nul
    1> 1 Datei(en) kopiert.

    This is with spaces:
    1> Written C:\Projekte\path with spaces\ptlib-a20bbb3d650cd17aff7d3e46e5d2e5d1a368bdf7\src\ptlib\msos../../../Lib/Win32/include/ptlib_config.h
    1> Configuration completed.
    1> Updating revision include file.
    1> git commit cannot be found
    1> Syntaxfehler.

    There seems to be a problem with the git copy operation.

    Problematic line in Console_2017:

    if errorlevel 1 copy %(FullPath)+nul %(RootDir)%(Directory)%(FileName)

    This fixes the issue:

    if errorlevel 1 copy "%(FullPath)" "%(RootDir)%(Directory)%(FileName)"

    The same problem is also present in the opal_2017 project.

    Plus in opal_2017 we need to also fix the SRTP copy:

    copy /Y %(FullPath) $(ProjectDir)..\rtp\libsrtp\include\config.h > NUL

    Fixed line:

    copy /Y "%(FullPath)" "$(ProjectDir)..\rtp\libsrtp\include\config.h" > NUL

     
  • Robert Jongbloed

    • status: open --> closed-fixed
     
  • Robert Jongbloed

    Thank you for debugging that. I have checked in the fix.

     

Log in to post a comment.