Quote:> Hi Corey,
> I wanted to build it because others had said they were having
> problems. Also as BCB for Linux is coming out I thought it would be a
> good opporunity to help those BCB game programmers go cross-platform.
Will be interesting to see how BCB on Linux goes. I'm definitely looking
forward to it :)
Quote:> So what is the purpose of the "lib" file?
> In Delphi/Kylix all you need is the header file and a DLL and you are
> able to access the functions in the DLL. And that is exactly how I have
> used JEDI-SDL.
> I thought that was what the *.h files were for.
The header files (*.h) describe the imported functions to the compiler, so
that it knows how to compile calls to them - parameters, return values,
calling convention, etc.
The lib file is a stub that loads the DLL and gets the various entry points
at runtime. When you link to the DLL all of your calls to functions in the
DLL are linked to the LIB file, which passes them onto the DLL... if that's
not too confusing :)
Quote:> 2nd Question. Do I now need to include the "lib" file in any projects I
> need or can I simple stick in a path somewhere.
Yes, and no. You can add the following line near the top of sdl.h:
#pragma link "sdl.lib"
Assuming you have sdl.lib in your linker path it'll add it to the project if
you've included sdl.h at any point.
As to why you have to do this with BCB when you don't with Delphi... here's
the definition for SDL_Init from SDL.par (JEDI-SQL):
function SDL_Init(flags: uint32): Integer; cdecl; external LibName;
LibName is defined as either 'sdl.dll' or 'libSDL-1.1.so.0', depending on
platform. This effectively does what the lib file does - creates an entry
point that's valid at link-time, so your functions can call it. Since
there's no equivalent syntax in C++ for doing that, we use lib files.
Quote:> Are you working on any SDL games/applications at the moment?
Yup. I could tell you what it is, but then I'd have to shoot you :)
Seriously though, I'm playing around with a few ideas I had for a
multi-player adventure/roleplaying game. I'm using SDL for the client, and
probably for the server just for the platform-independant threading and
stuff. I'd like to have both Linux and Win32 clients, and if I decide to
write a multi-shard server pool it'd be nice not to be restricted to one
The Electric Monk
"Quidquid latine dictum sit, altum viditur."