Help creating my own 2D lib.
ZIYAD A. M. AL-BATLY
zamb at saudi.net.sa
Sun Oct 2 23:47:07 UTC 2005
On Sun, 2005-10-02 at 18:57 -0400, Rogelio Nodal wrote:
> Hello list,
> I would like to create a high level 2D lib using SDL, and I was
> wondering if it was possible to compile my lib
> in a way that, the application that is being compiled does not need
> the SDL headers and does not need the
> SDL lib. If it is possible, how it's done?Also what is the diff of a
> static lib vs a shared one, and which one
> should I use for my goal. Thanks a lot for your time.
After compiling your application you never need the header
files, as they already served their purpose.
Link your application statically against "libSDL" (yes, that's
the difference between dynamic/shared linking and a static one).
See "gcc" and "ld" manuals for more information about
(Also, there's another way: use "dlopen()" to load the "libSDL"
from the current (or another known) directory. You need to
distribute the "libSDL.so" (or "libSDL.dll" under Windows, but I
have no idea if "dlopen()" works the same way in that land) file
with your application, though. For more information about
"dlopen()" see the manual page.)
I hope this was helpful. I'm not an expert in C/C++, but I'm almost
sure the above information is correct.
More information about the ubuntu-users