Hi all, I just signed up to this list.
Having used SDL some year ago, from the 1.2 branch, I wanted to take the
new 2.0 RC for a spin but I’m having a tough time. I hope I’m not missing
something obvious, but I’ve been unable to find a simple "getting started"
doc about this version. I’m not saying a full-on tutorial, just what kind
of VisualStudio / Xcode project should be used and what to link in which
order, that’s all.
I first started with Xcode because my work box is a Mac, downloading the
2.0RC development package. Besides the SDL2.framework there’s also a
"devel-lite" directory with a textfile with outdated? information regarding
non-existant SDLMain.a files and whatnot. It seems those files are no
longer required? Should I make a Cocoa or Console app? Tried with Cocoa,
removed all files and created a simple main.cpp, but got a linker error
stating that it couldn’t find the SDL2 framework I just linked to the
project…
There’s also a bunch of old SDL 1.3 / pre-RC 2 Xcode templates that seem
abandoned now, none of them ran out of the box neither. README-macosx.txt
on HG seems to be about the 1.2 branch still.
Then I tried on Windows 7 with VS 2012, since Windows is usually better
supported for these things. I used the following article as a guide:
http://twinklebeardev.blogspot.com.ar/2012/07/setting-up-sdl-in-visual-studio.html.
Seems to be the same process I remember from years ago, I just replaced
references to SDLMain.lib and SDL.lib with SDL2Main.lib and SDL2.lib.
Compiled and linked successfully, but it doesn’t run: “The application was
unable to start correctly (random hex error code)”. I’m not even calling
any SDL api in it, main() just returns zero.
Old SDL code included SDL.g like this <SDL/SDL.h> and declared main like
this: int main(int argc, char** argv). I remember this being quite
important back in the old 1.2 days. Now there are some tutorials that use
that format, yet the SDL wiki just declares int main() and includes “SDL.h”
(the include folder seems to have lost its former SDL directory too.
I’m almost sure that I’m missing stuff, but right now getting information
on how to build a simple SDL application seems to be very difficult. I know
I’m not talking about a mature, final release, but having an RC out and not
having a simple readme on how to use the lib seems very weird to me.
I’m sorry if this message come out a little rude, it’s not my intention.
But english isn’t my native tongue and I’m a little frustrated right now.
I’d like to gather the basic information needed to build a simple SDL2
"Hello World" and even put it in a website / wiki myself if necessary
Cheers,