Jump to content
  • Advertisement
Sign in to follow this  

Newb needing help (tutorial 1)

This topic is 4969 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

SETUP QUESTIONS: 1. I'm using VC7 and I was wondering if there was a way to setup the linking so that I dont have to type:
#ifdef WIN32
#pragma comment(lib, "SDL.lib")
#pragma comment(lib, "SDLmain.lib")
at the begining of all my sdl programs, as far as I can tell the menu has changed in vc7 so i couldnt follow the instructions where I read them.

Share this post

Link to post
Share on other sites
You can either

A) Pragma the libs into every project


B) Link them from the settings for every project.

Really not much of a difference - except that the pragmas make it explicit in the source which libs your project needs, so that, though the pragma's themselves aren't portable, it'll be a lot easier for someone else to get up and running in a different IDE.

Share this post

Link to post
Share on other sites
okay, i suggest not using pragma

download the sdl includes and lib files.
create a folder called API/SDL/
in the SDL folder dump all the files there.
go to "Tools">"Options">"Projects">"VC++ Directories"
you will then see a drop down menu that says executable files.
go to includes and libs, and link the url to the API/SDL file

after that is done, go to Projects on the top menu, then go to propreties
Under C/C++>>code generator, change "Single-threaded Debug (/MLd)" to "Multi-threaded DLL (/MD)"
then go to linkers under command lines type "sdl.lib sdlmain.lib"
place SDL.dll to your project folder to run it.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!