On Fri, Aug 20, 2010 at 1:26 PM, Heizer, Charles <[email protected]> wrote: > > I have been googling for a while now and have tried a few suggestions I > have found in other like posts but have not had much success. > > I'm trying to create a stand alone Foundation tool which will connect to > MySQL and I can get this to work if I link to the "libmysqlclient.dylib" > library. But as others have also wanted :) I do not want the user to have > to install the MySQL connector software. > > I have added the "Other linker flags" "-lmysql -lpthread -lz $(inherited)" > and no luck, I always need the "libmysqlclient.dylib" in my DYLB path for > it to work.
The "-l" linker flag will always prefer dynamic libraries over static. To link with a static library when both are present, just provide the full path to the library, without the "-l". For example: "/usr/local/lib/mysql.a -lpthread -lz $(inherited)". sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
