A little Visual Studio 2003/2008 help (SDL)
If I could get some help and have someone verify that I'm pointing to the right development library in the Visual Studio 2003 set up tutorial.
I'd test it myself but I have a group project (ugh) worth a huge chunk of my grade I have to work on.
Also for those who have used SDL with VS2008 Visual Studio, is it pretty much the same as VS2005?
Your tutorial works flawlessly with Visual Studio 2008 Professional. The only thing that needs to be changed is the path to the Visual Studio directories, but that is trivial. I actually have been planning to go through your tutorials when this semester ends, and I can let you know if anything needs to be changed.
Well I stopped at step 2 since I don't think you should be messing with your Visual Studio folders not to mention if you are running a 64 bit version of Windows the paths you mention are all incorrect anyways and will probably confuse newbies.
I'm suprised this hasn't been fixed since I always see people recommending your SDL tutorials?
Otherwise yeah VS 2008 is very similar to VS2005 and I know SDL works with it since I set it up not long ago.
The VisualC.html file included with SDL shows the correct way and the way I set it up with VS 2008 and it works fine for me:
Creating a Project with SDL
Create a project as a Win32 Application.
Create a C++ file for your project.
Set the C runtime to "Multi-threaded DLL" in the menu: Project|Settings|C/C++ tab|Code Generation|Runtime Library .
Add the SDL include directory to your list of includes in the menu: Project|Settings|C/C++ tab|Preprocessor|Additional include directories .
VC7 Specific: Instead of doing this I find it easier to add the include and library directories to the list that VC7 keeps. Do this by selecting Tools|Options|Projects|VC++ Directories and under the "Show Directories For:" dropbox select "Include Files", and click the "New Directory Icon" and add the [SDLROOT]\include directory (ex. If you installed to c:\SDL-1.2.5\ add c:\SDL-1.2.5\include). Proceed to change the dropbox selection to "Library Files" and add [SDLROOT]\lib.
The "include directory" I am referring to is the include folder within the main SDL directory (the one that this HTML file located within).
Now we're going to use the files that we had created earlier in the Build SDL step.
Copy the following files into your Project directory:
SDL.dll
Add the following files to your project (It is not necessary to copy them to your project directory):
SDL.lib
SDLmain.lib
(To add them to your project, right click on your project, and select "Add files to project")
Instead of adding the files to your project it is more desireable to add them to the linker options: Project|Properties|Linker|Command Line and type the names of the libraries to link with in the "Additional Options:" box. Note: This must be done for each build configuration (eg. Release,Debug).
p.s. oh and step 12 is only really necessary for Visual Studio versions prior to VS 2005
Notable change in VS 2005
I'm suprised this hasn't been fixed since I always see people recommending your SDL tutorials?
Otherwise yeah VS 2008 is very similar to VS2005 and I know SDL works with it since I set it up not long ago.
The VisualC.html file included with SDL shows the correct way and the way I set it up with VS 2008 and it works fine for me:
Creating a Project with SDL
Create a project as a Win32 Application.
Create a C++ file for your project.
Set the C runtime to "Multi-threaded DLL" in the menu: Project|Settings|C/C++ tab|Code Generation|Runtime Library .
Add the SDL include directory to your list of includes in the menu: Project|Settings|C/C++ tab|Preprocessor|Additional include directories .
VC7 Specific: Instead of doing this I find it easier to add the include and library directories to the list that VC7 keeps. Do this by selecting Tools|Options|Projects|VC++ Directories and under the "Show Directories For:" dropbox select "Include Files", and click the "New Directory Icon" and add the [SDLROOT]\include directory (ex. If you installed to c:\SDL-1.2.5\ add c:\SDL-1.2.5\include). Proceed to change the dropbox selection to "Library Files" and add [SDLROOT]\lib.
The "include directory" I am referring to is the include folder within the main SDL directory (the one that this HTML file located within).
Now we're going to use the files that we had created earlier in the Build SDL step.
Copy the following files into your Project directory:
SDL.dll
Add the following files to your project (It is not necessary to copy them to your project directory):
SDL.lib
SDLmain.lib
(To add them to your project, right click on your project, and select "Add files to project")
Instead of adding the files to your project it is more desireable to add them to the linker options: Project|Properties|Linker|Command Line and type the names of the libraries to link with in the "Additional Options:" box. Note: This must be done for each build configuration (eg. Release,Debug).
p.s. oh and step 12 is only really necessary for Visual Studio versions prior to VS 2005
Notable change in VS 2005
Quote:Original post by Lazy Foo
Also for those who have used SDL with VS2008 Visual Studio, is it pretty much the same as VS2005?
It's actually a lot less work.
Personally, I want to thank you for making those tutorials. You showed me how easy it is to learn a library. Thank you!
Quote:Original post by anothrguitarist
The only thing that needs to be changed is the path to the Visual Studio directories, but that is trivial.
I would like to turn the 2005 express tutorial into a 2005-2008 tutorial. If the only change is the directories there's no point in making an extra tutorial. What are the paths for the lib and include on 2008?
Quote:Original post by daviangel
I don't think you should be messing with your Visual Studio folders not to mention if you are running a 64 bit version of Windows the paths you mention are all incorrect anyways and will probably confuse newbies.
I plan on switching from copying files over to editing configuration for the next tutorial revision. Its just when you have install over 10 different C++ IDEs on your computer it's a lot easier to direct copy files over.
Strangely enough, I have never seen anybody complain about 64bit window compatibility before.
The new directory is just:
C:\Program Files\Microsoft Visual Studio 9.0\VC\lib
But I think your readers could figure it out anyway. I don't think there were any other changes.
C:\Program Files\Microsoft Visual Studio 9.0\VC\lib
But I think your readers could figure it out anyway. I don't think there were any other changes.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement