Where is the vcproj file in Visual Studio (for SDL)?

464 views Asked by At

Ive been recently interested in creating C++ applications utilizing SDL however I have been stopped many times with compilation errors etc.

Recently I have tried again using Visual Studio as my IDE. I have linked the libraries correctly (or so I think) and have come to the conclusion of my problem with the second SDL tutorial by LazyFoo which shows an image.

Within this tutorial it states that the image file to display MUST be in the same folder as the .vcproj file. Although for me their is none, am I merely overlooking it? Or is this tutorial outdated?

EDIT: I have attempted pasting the file in every directory project to no avail.

1

There are 1 answers

0
MSalters On

The root cause is that the tutorial specifies the filename, bu not the file directory. That means the current working directory is assumed. In VC++, this might or might not be the location of a .vcproj file depending on many factors.

Instead, go to the property pages of your project, check "Configuration Properties>Debugging>Working Directory". In general, this will be a macro (e.g. $(ProjectDir). If you choose "Edit" and then "Macros>>", you can view the current macro value.

(This is a poorly design UI, though. There really should be a way to just view the current value, as well as a way to check macro dependencies)