Help creating my own 2D lib.
Rogelio Nodal
rnodal at verizon.net
Mon Oct 3 00:16:35 UTC 2005
ZIYAD A. M. AL-BATLY wrote:
>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.
>>
>>
>>
>>
>>-R
>>
>>
>>
>First:
> After compiling your application you never need the header
> files, as they already served their purpose.
>
>Second:
> 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
> compiling/linking applications.
>
> (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.
>Ziyad.
>
>
>
>
>
Sorry but im not making a app im making a library. So I do need the
headers. But thanks for your help. I will check dlopen.
Thanks a lot.
More information about the ubuntu-users
mailing list