www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Using SDL with Linux

reply Hytak <Hytak_member pathlink.com> writes:
Hello,
I am programming SDL things, and I just switched from windows to linux. I was
using derelict on Windows, but with Linux, what can we use? On the derelict's
forum, they speak a bit of Linux, but only of how they will do to port it. (And
they are only to the stage of asking who will do it...so)

Is there any other SDL port?

Thanks, Hytak
Oct 23 2004
next sibling parent Mike Parker <aldacron71 yahoo.com> writes:
Hytak wrote:
 Hello,
 I am programming SDL things, and I just switched from windows to linux. I was
 using derelict on Windows, but with Linux, what can we use? On the derelict's
 forum, they speak a bit of Linux, but only of how they will do to port it. (And
 they are only to the stage of asking who will do it...so)
 
 Is there any other SDL port?
You can use DerelictSDL on Linux with a couple of minor changes. Clayasaurus made a post on the Derelict forums describing how. Just make sure you are using the lated trunk from the repository and not the Derelict 0.1 package.
Oct 23 2004
prev sibling parent reply Ilya Minkov <minkov cs.tum.edu> writes:
Yes, there are simple header translations as well, they should already 
work everywhere.

See here:
http://www.prowiki.org/wiki4d/wiki.cgi?EvaluationGuide
http://shinh.skr.jp/d/porting.html

And here:
http://svn.dsource.org/svn/projects/deliria/

I'm afraid Derelict can make programs somewhat larger and increase their 
start-up time, as opposed to header translations. The advantage of 
Derelict as opposed to header translations is that it needs no linker 
stub and can add program-defined handling when the library is not in 
place. Header translations need a linker stub - on Windows it is a .LIB 
file which only describes the corresponding .DLL file (and can be 
usually made from a DLL using implib), but i don't know how you do them 
on Linux.

-eye

Hytak schrieb:
 Hello,
 I am programming SDL things, and I just switched from windows to linux. I was
 using derelict on Windows, but with Linux, what can we use? On the derelict's
 forum, they speak a bit of Linux, but only of how they will do to port it. (And
 they are only to the stage of asking who will do it...so)
 
 Is there any other SDL port?
 
 Thanks, Hytak
 
 
Oct 24 2004
parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Ilya Minkov wrote:

 [...] Header translations need a linker stub - on Windows it is a .LIB 
 file which only describes the corresponding .DLL file (and can be 
 usually made from a DLL using implib), but i don't know how you do them 
 on Linux.
On Linux you use a non-versioned .so file (usually it is just a symlink) for development/linking, and then a versioned .so.1.2.3 for runtime. In RPM environments, you have e.g. "sdl-devel" and "sdl" RPM packages. To link your program, you use something like: "LDFLAGS=-lSDL" in Make. There are no special .LIB files for dynamic libraries, just the normal static libraries (libfoo.a) which are the same as FOO.LIB on Windows. Mac OS X has UNIX libraries (.a and .dylib), but also NeXT Frameworks. http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/ --anders
Oct 24 2004