Help making my own lib

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.

-R

AFAIK if you compile a library people will only have to #include your
headers, so the trick is not to include SDL directly in your headers( at
least not in your public ones ).

as for not needing the SDL .dll/.so i don’t know exactly. google is your
friend. note this affects the license your programs can use, though. if
you’re going to be providing dlls anyway why not include SDL as a dll and
save yourself hassle?

a static lib is one that the compiler embeds the code from directly into
your executable, hence your executable is stand-alone

a dynamic lib is one where the code is compiled separately and joined with
the applications code at run time.

hope this helps…On 10/2/05, 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.

-R


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Brian Barrett wrote:

AFAIK if you compile a library people will only have to #include your
headers, so the trick is not to include SDL directly in your headers(
at least not in your public ones ).

as for not needing the SDL .dll/.so i don’t know exactly. google is
your friend. note this affects the license your programs can use,
though. if you’re going to be providing dlls anyway why not include
SDL as a dll and save yourself hassle?

a static lib is one that the compiler embeds the code from directly
into your executable, hence your executable is stand-alone

a dynamic lib is one where the code is compiled separately and joined
with the applications code at run time.

hope this helps…

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.




-R

_______________________________________________
SDL mailing list
SDL at libsdl.org <mailto:SDL at libsdl.org>
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Thanks a lot for your time. You were helpul. I made a mistake, I forgot
that if I include the SDL headers in my headers, the app that is going to be
develop also need to find the headers. I thought for a moment that I
needed SDL, thats why I asked the differences between static and dynamic.
I was staticly linking my app so I would needed the SDL lib. I just
forgot that I needed the headers :). Thanks a lot for your answer.

-R> On 10/2/05, Rogelio Nodal <rnodal at verizon.net <mailto:rnodal at verizon.net>> wrote: