Skip to main content
GameDev.net gamedev.net
🔒 Locked

Using SDL and Vista

Started by chbrules Feb 23, 2007 at 10:53 PM 9 replies 5.3k views
Original Post
chbrules
chbrules
Doesn't seem to be exactly working. I'm using Visual Studio 2005 with the latest updates on Windows Vista Business edition. I set my project to use a multithreaded DLL and used pragmas to include the SDL libs. I wrote a simple program that just initializes SDL video and creates a window, but the program just crashes. I don't know what I could be doing wrong. Does the SDL DLL not work under Vista because of DX conflicts or something? Thanks!
-Conrad
daviangel
daviangel
You might want to post what videocard/drivers you are using under Vista since from what I understand/read from other vista users crashes are quite common with certain nvidia cards/beta drivers under vista?
Other than that unless SDL makes use of older versions of DX like version 5 or certain audio functions it should work theoretically under vista since it's supposed to be backwards compatible for the most part.
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
chbrules
chbrules
Sorry. I'm using an nVidia GeForce 7600GS with the latest 100.64 drivers.

Visual Studio 2005 always prompts me to specify an entry point for the LINKER and I've just been putting 'main' in there. I remember I had this problem once before in .NET 2003 and I fixed it with some other name for the entry point. Maybe that could be it?
-Conrad
Kwizatz
Kwizatz
Now that you mention it, SDL does rely on DDraw for Windows 2D, which has been deprecated for a while.

My advice would be to try to create an OpenGL window (SDL_SetVideoMode with SDL_OPENGL), if that works, then its definitely because of the loss of direct draw.
chbrules
chbrules
Quote:
Original post by Kwizatz
Now that you mention it, SDL does rely on DDraw for Windows 2D, which has been deprecated for a while.

My advice would be to try to create an OpenGL window (SDL_SetVideoMode with SDL_OPENGL), if that works, then its definitely because of the loss of direct draw.


Let me give it a try...

Edit: Nope, same problem, it's just dying as soon as execution starts. I tried to do some cout's before anything is done in the main function, but the problem, it just crashes. I created different C++ projects and those have worked fine, but SDL projects won't even run, even if I comment out all the SDL calls and just have main do a cout.
-Conrad
Kwizatz
Kwizatz
Weird, wish I could help, but I am still on Win2K.
daviangel
daviangel
You could try python with pygame and see if that works on vista since it makes use of SDL too.
I'd try it myself but microsoft never sent me my free copy of Vista so I'm still on XP myself.
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
chbrules
chbrules
Well, I went back to MSVC++ .NET 2003 and it works fine. I don't understand what I did wrong with MSVC++ 2005. I did it the same setup and just a basic window creation through SDL, how hard could that be? Meh, at least I can program now. :)
-Conrad
dbrock
dbrock
Im using Vista Ultimate and I'm able to use SDL just fine. DirectX 10 is installed, as well as the latest version of SDL. I'm using VS .NET 2003, but I've also tried Dec-cpp and thats also working.

Try compiling your program with the Subsystem set to Console, rather then Windows.
Dexter BrockDead Cold - http://deadcold.smallchangestudios.net
DeathBySpoon
DeathBySpoon
Make sure the Win32 SDK is installed as well. Your setup will have problems without it.
joanusdmentia
joanusdmentia
Quote:
Original post by chbrules
Visual Studio 2005 always prompts me to specify an entry point for the LINKER and I've just been putting 'main' in there. I remember I had this problem once before in .NET 2003 and I fixed it with some other name for the entry point. Maybe that could be it?


This could very well be your problem. Setting your entry point as 'main' will not work, there's a lot of housekeeping that *needs* to be done before execution reaches main. If VS2005 is complaining about this needing to be specified make sure that the 'SUBSYSTEM' entry is set correctly in the 'Linker->System' settings. From MSDN here with regards to the 'ENTRY' option:

Quote:
The function must be defined with the __stdcall calling convention. The parameters and return value must be defined as documented in the Win32 API for WinMain (for an .exe file) or DllEntryPoint (for a DLL). It is recommended that you let the linker set the entry point so that the C run-time library is initialized correctly, and C++ constructors for static objects are executed.
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The nly verdict is vengeance; a vendett o

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.