Jump to content
  • Advertisement
Sign in to follow this  
Soilborn

Getting SDL downloaded and installed

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

I'm sort of at the point where I'm tearing my hair out over this one. I have Microsoft Visual Studio Express 2012 and I'm trying to get started working with SDL 2.0. My problem is that I'm not finding any complete tutorials.

 

I've found a great guide for setting it up here, but I tried compiling it and I get the error "LNK1104: cannot open file SDL.lib" Huh. I put a copy of the file where I was told to, as well as in every other folder. I also get the warning "LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library." No idea what this means.

 

I am determined that my problem is that I don't know WHAT I need to download. I originally got the source code and found much of what I needed missing. I got and combined the runtime binaries and dev libraries, and that's what I'm working with now. But following this experiment, I'm not even sure of that. Help? Please? I really want to move on and learn to use SDL.
 

Share this post


Link to post
Share on other sites
Advertisement

It's yelling at me saying "The program can't start because SDL2.dll is missing from your computer. Try reinstalling the program to fix this problem." =\

Share this post


Link to post
Share on other sites


It's yelling at me saying "The program can't start because SDL2.dll is missing from your computer. Try reinstalling the program to fix this problem." =\

 

From your tutorial:

 

 

Before we can run this program we’ll need to copy the SDL binary into our executable’s directory. SDL2.dll can be found in the lib directory of your SDL folder under lib/(x86/x64), use the one for the architecture you linked against.

Share this post


Link to post
Share on other sites

 



It's yelling at me saying "The program can't start because SDL2.dll is missing from your computer. Try reinstalling the program to fix this problem." =\

 

From your tutorial:

 

 

Before we can run this program we’ll need to copy the SDL binary into our executable’s directory. SDL2.dll can be found in the lib directory of your SDL folder under lib/(x86/x64), use the one for the architecture you linked against.

 

In my original post I'd pointed out that I'd already done that and, in fact, put a copy in every folder of the project. Maybe it's because my code isn't creating an executable when I run it?

Share this post


Link to post
Share on other sites

I had mIssing DLL errors which turned out to be due to me installing the 64bit versions, and not realising my compiler was 32bit.  Do you remember which version you extracted, cause they're not clearly named.

Share this post


Link to post
Share on other sites


In my original post I'd pointed out that I'd already done that and, in fact, put a copy in every folder of the project. Maybe it's because my code isn't creating an executable when I run it?

 

No...

 


I've found a great guide for setting it up here, but I tried compiling it and I get the error "LNK1104: cannot open file SDL.lib" Huh. I put a copy of the file where I was told to, as well as in every other folder. I also get the warning "LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library." No idea what this means.

 

You said you put a copy of SDL.lib in every folder. I said that you do not have SDL2.dll in the right place.

Share this post


Link to post
Share on other sites

Ah Pink Horror, I think I know where our complexities arise. I said it was looking for SDL.lib, and then said I put a copy of the file where i was told to. It seems you thought I meant that I had copied SDL2.lib, when what I meant was SLD2.dll. My apologies, I should have been more clear.

 

Okay, so I tried setting things up again from scratch, same process. For some odd reason it seems to work fine. The first time I ran the simple program given in the tutorial it gave me a directex error. It ran in Avast Sandbox mode though which, though happy with it, terminated the application before I could get the error code. Every time I've run the program since it works without a hitch.

 

I think my problem is that I have two Program Files folders, "Program Files" and "Program Files (x86)". This seems like it was likely the root of the problem. Before I retried the tutorial I moved my libraries and includes from the later to the former. I think Visual Studio just didn't like the "(x86)" part of the folder name.

 

I was also getting a warning under my error list the second or third time I launched the tutorial application, but it's since vanished from subsequent executions. I think I'm good to go. Thanks anyway, Pink Horror! I'd hug you if I could.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!