Setting up SDL for Visual C++ 2005

Started by
15 comments, last by marcus12024 15 years, 8 months ago
I found the problem....

I have to set the CONSOLE subsystem.

And then, use the main like this: "int main(int argc, char *argv[])"

"int main()" does not work.

;)
Advertisement
I had a really difficult time with the SDL release and Visual Studio 2005 SP1.

I kept getting really annoying manifest errors when the debugger attempted to use/load the SDL.dll, and I spent too much time trying to track down these errors online.

The only workaround that immidiately fixed up these issues was to build the SDL source in VS2005.

hth,
Quote:Original post by n00body
When I try to use SDL_opengl.h, it keeps saying that "cannot open windows.h". I assumed that the windows SDK would fix that, but it still doesn't work. What am I missing?




I've got the same problem. I lloked into the VC/Includes directorie and it's just missing. No "windors.h" file. They aren't GL libraries too, so I think it could be related to the "Express" think (My guess is that in the free relase the just missed many libraries). Does anyone know how to fix it? I'm just trying to move from VC++ 6 to the 2005, but my projects don't work 'cause of that...


Thank you
Before using SDL, make sure you have the latest version of Visual Studio with the latest service pack installed and the platform SDK installed and configured.

Learn to make games with my SDL 2 Tutorials

Well...

first, thanks to lazy foo and his tutorials, which made me learn SDL.

Now that I can run my old project in VC++ 2005, SDL_image seems to have forgot how to load an jpg...

loadedImage = IMG_Load( "Data/secsi.jpg" );

then loadedImage is just NULL u.u

(I'm getting off topic, no? should I open a new thread? xDDDD)
Quote:Now that I can run my old project in VC++ 2005, SDL_image seems to have forgot how to load an jpg...

loadedImage = IMG_Load( "Data/secsi.jpg" );

then loadedImage is just NULL u.u

Try moving where the data folder is. The working directory may be different than where you are used to in VS 6.0. Your working directory is by default I think the same as where the source files are. That is where it is for me but I am not sure if I moved anything.
Evillive2
Quote:Original post by Atridas
Well...

first, thanks to lazy foo and his tutorials, which made me learn SDL.

Now that I can run my old project in VC++ 2005, SDL_image seems to have forgot how to load an jpg...

loadedImage = IMG_Load( "Data/secsi.jpg" );

then loadedImage is just NULL u.u

(I'm getting off topic, no? should I open a new thread? xDDDD)


I realize this is an old thread, but I recently had the exact same issue, and found a solution. Chances are you are missing jpeg.dll on your system, which is included as part of the binary download of SDL_image from the SDL_image download page

You either need to include jpeg.dll in the same folder as your executable, or could put it somewhere "visible" to applications on your system, like in the windows\system32 folder.

Hope this helps anyone else that may be encountering the same issue. Sometimes SDL is a little too good at failing gracefully, and in this situation it simply doesn't load in the image...sadly it doesn't return an error code that I can see, or any way to tell that it happened because the jpeg.dll file wasn't found.
Life's Short. Make Games.

This topic is closed to new replies.

Advertisement