#ifdef WIN32
#pragma comment(lib, "SDL.lib")
#pragma comment(lib, "SDLmain.lib")
#endif
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.
Newb needing help (tutorial 1)
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:
You can either
A) Pragma the libs into every project
or
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.
A) Pragma the libs into every project
or
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.
what does pragma mean... =/
and, do you know how to linkit from the settings?
[Edited by - Oglethorpe on November 30, 2004 7:32:47 PM]
and, do you know how to linkit from the settings?
[Edited by - Oglethorpe on November 30, 2004 7:32:47 PM]
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement