• Advertisement

Archived

This topic is now archived and is closed to further replies.

Is there a certain file I have to put SDL In

This topic is 5094 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

It keeps on saying cannot open SDL.h and I have downloaded the Win32 thing also.

Share this post


Link to post
Share on other sites
Advertisement
You need to add the SDL include folder to your include directories. Tools / Options / Directories in VC 6.

Share this post


Link to post
Share on other sites
quote:
Original post by Willm
You need to add the SDL include folder to your include directories. Tools / Options / Directories in VC 6.


You also need to have at the least DirectX 5 runtime installed.

Share this post


Link to post
Share on other sites
go into your .net folder and look for a folder called includes and another folder called lib''s..... might be under soemthing could VC98 or something like that.......then once all the SDL libraries/headers are inside your folders, you have to start a win 32 console app, go to projects>settings> click on c++, go to code generation in the drop down box, then switch one of the other boxes to multi-threaded DLL, then you click on the link tab (still inside the projects>settings> and add sdl.lib and sdlmain.lib to the list of included libs.

thats how it is in vc++ im sure its similar in .net... if you still cant get it go to www.libsdl.org and im sure they have a tutorial there somewhere for setting it up in .net

Share this post


Link to post
Share on other sites
Open your project proerties box and select the C/C++ folder. Right at the top there is an option called "Additional Include Directories" so just add the path to the SDL include folder in there or alternatively copy the SDL headers from whereever they are to the default include directory - something like Program Files->Microsoft Visual Studio .Net 2003->VC7->include

Share this post


Link to post
Share on other sites
Lol I get a linking error cannot open SDL.h.

Share this post


Link to post
Share on other sites
Did you follow those steps first of all? If you have, try downloading the file again and see if maybe the file was just corrupt.

Scott Simontis
e-mail:ageofscott@NOSPAM.comcast.net
AIM:ssimontis

Share this post


Link to post
Share on other sites
It still dosnt work;maybe ill try ddraw again,

Share this post


Link to post
Share on other sites
And...? What is the result now?

Scott Simontis
e-mail:ageofscott@NOSPAM.comcast.net
AIM:ssimontis

Share this post


Link to post
Share on other sites
quote:
Original post by MPG
cannot find SDL.h LNK error.


most of the time its in #include <SDL/SDL.h>

Share this post


Link to post
Share on other sites
Hers the error:
LINK : fatal error LNK1104: cannot open file ''SDL.h''

Share this post


Link to post
Share on other sites
/* -- Include the precompiled libraries -- */
#ifdef WIN32
#pragma comment(lib, "SDL.lib")
#pragma comment(lib, "SDLmain.lib")
#endif


did you forget this? i just started using .net and got SDL working fine

Share this post


Link to post
Share on other sites
MPG, it looks like you''ve added the SDL header file SDL.h as a library file in your linker options, when you really should be using SDL.lib as the library file.


"Sneftel is correct, if rather vulgar." --Flarelocke

Share this post


Link to post
Share on other sites
It worked thanks,Now when i run it it says failed to run bexcause sdl.dllwasnt found.

Share this post


Link to post
Share on other sites
Drop a copy of sdl.dll into your project directory. sdl.dll can be found at the main sdl website under downloads.

Share this post


Link to post
Share on other sites

  • Advertisement