Re: Statically linking a lib ...
Re: Statically linking a lib ...
- Subject: Re: Statically linking a lib ...
- From: Sam Goldman <email@hidden>
- Date: Tue, 02 Apr 2002 15:18:24 -0800
Hi Mario,
If you link a static library to your app, then the symbols that you use will
be added into the executable, no extra work there.
There are already Cocoa Objective-C wrappers for connection with MySQL. I
know that my own has the library bundled inside. Here is a short list.
http://mysql-cocoa.sourceforge.net. This is by Serge Cohen and seems to work
well.
http://lucidsql.sourceforge.net. This is my own and I can not assure its
quality, seeing as it is still a alpha and does not implement many things
besides grabbing database and table names.
http://sourceforge.net/projects/dathor. This one is by Stefan
Lange-Hegermann and does not have any content up.
Although you might not need to use these, you can use their code (at least
you can use mine) to help you along the way.
If you want to load the library dynamically, which AFAIK is not a feature of
a static library, you can compile it from the MySQL source files using
libtool to make a dylib and then safely nest that Frameworks as the
cocoadevcentral.com article suggests.
Happy coding,
Sam
On 4/2/02 2:44 PM, "Mario Scarpa" <email@hidden> wrote:
>
I've written a simple app to store information about audio CDs: it has
>
the possibility to post and store these info on a remote MySQL DB so
>
I used the MySQL C APIs and am linking against libmysqlclient.10.dylib.
>
>
Now, I want to give the app out without forcing people to install the lib
>
by themselves so I decided to link it statically: I know OTOH there 's
>
the possibility
>
to let the lib load dynamically putting it in a dir (Framework ?) under
>
Resources in the .app bundle ... what would you do ? Which is the "right"
>
solution if ever ?
--
Windows is a 32-bit patch to a 16-bit shell for an 8-bit operating system
written for a 4-bit processor by a 2-bit company without 1 bit of sense.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.