Thanks for the quick response. So I just tried this and I'm having the same issue.
I changed my "Other linker flags" as suggested and when I try to run this without the libmysqlclient.dylib in my path it still complains ... /Users/local/Desktop/new/MySQLTest2 dyld: Library not loaded: libmysql.16.dylib Referenced from: /Users/local/Desktop/new/MySQLTest2 Reason: image not found Trace/BPT trap Thanks, Charles -- Charles Heizer Systems Management Solutions Group Lawrence Livermore National Laboratory P: 925-422-0197 On 8/20/10 10:34 AM, "Sherm Pendley" <sherm.pend...@gmail.com> wrote: >On Fri, Aug 20, 2010 at 1:26 PM, Heizer, Charles <heiz...@llnl.gov> 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 (Cocoa-dev@lists.apple.com) 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 arch...@mail-archive.com