Re: OS X 10.9.4, Xcode 5.1.1 and mysql-5.6.20-osx10.8-x86_64
Re: OS X 10.9.4, Xcode 5.1.1 and mysql-5.6.20-osx10.8-x86_64
- Subject: Re: OS X 10.9.4, Xcode 5.1.1 and mysql-5.6.20-osx10.8-x86_64
- From: Bavarious <email@hidden>
- Date: Fri, 08 Aug 2014 11:39:45 -0300
On 8 Aug 2014, at 11:30, Scott Ribe <email@hidden> wrote:
>
> On Aug 8, 2014, at 8:15 AM, email@hidden wrote:
>
>> I created a new command line project. Replaced the content of main.cpp with the above.
>> Added the library mysqlclient.a.
>
> And yet, the error message indicates it's looking for libmysqlclient.dylib. The linker has a (what I consider very peculiar) preference for dynamic libraries, and will butt-headedly link to the dynamic version if it can find one, despite the fact that you explicitly added the static library.
>
> Unfortunately, I dealt with this so long ago that I do not remember the exact solution. I'm pretty sure it involved copying the .a into my project's tree, so that it would be found before the directory that contained both a .dylib and .a. I don't think it involved deleting/moving or otherwise hiding the .dylib so it couldn't be found, but I'm not sure about that.
>
> There may also be some linker argument you could add to convince it that you really did mean to use a *gasp* static library...
If both the static .a and dynamic .dylib versions exist on the same location, there’s no linker argument to specify that the static version should be used instead of the dynamic version. That said, see Technical Q&A QA1393: Using static versions of existing dynamic libraries:
https://developer.apple.com/library/mac/qa/qa1393/_index.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden