We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1326 - Visual Studio: Spaces in Path cause post linker errors
Summary: Visual Studio: Spaces in Path cause post linker errors
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: x86_64 Windows 7
: P2 minor
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-04 13:03 UTC by Kenney Phillis Jr
Modified: 2012-01-08 11:51 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenney Phillis Jr 2011-11-04 13:03:20 UTC
When i checkout the latest SDL source into a path containing spaces the samples, fail to compile due to file not found errors.

For example, I checkout the project to:
C:\My Project Files\LibSDL\Libsdl HG 1.3\


When this attempts to finish the linker stages, it fails because of errors pertaining to spaces in the path throwing off command parser.

For example, all of these test samples contain (when testing against visual studio 2010):
copy $(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll $(TargetDir)\SDL.dll

This errors because variable SolutionDir results to be the path of:
C:\My Project Files\LibSDL\Libsdl HG 1.3\VisualC

This path causes problems because of the spaces contained in the path. The windows command line parser requires the whole file path to be in quotations, or for the path to use the dos compatible paths.

The fix is to modify the solution files and add the quotations to the various places where the copy command is used... For example the previously mentioned command will change to...

copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"


Note: This bug also exists when compiling the samples using LibSDL v1.2.x, and can easily be fixed by applying a similar patch on a per-file basis.
Comment 1 Sam Lantinga 2012-01-07 19:57:11 UTC
I just checked and it looks like the quotes have been added to the SDL 1.3 projects.
Can you verify that it works for you with the latest snapshot?
http://www.libsdl.org/tmp/SDL-1.3.zip
Comment 2 Kenney Phillis Jr 2012-01-08 11:29:31 UTC
(In reply to comment #1)
> I just checked and it looks like the quotes have been added to the SDL 1.3
> projects.
> Can you verify that it works for you with the latest snapshot?
> http://www.libsdl.org/tmp/SDL-1.3.zip

I just gave that a try, and it fixes the issue. However a note should still be made about this before adding new solutions or demos to the visual studio project files. I don't know about vs2008/vs2005, but they might improve by having a note about the proper setup of directories that have spaces in the path.