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: Keary Suska <email@hidden>
- Date: Fri, 08 Aug 2014 08:32:59 -0600
On Aug 8, 2014, at 8:15 AM, email@hidden wrote:
> Hi,
>
> I can not get the following program to work:
>
>
> //
> // main.cpp
> // tst2
> //
> // Created by za on 08/08/14.
> // Copyright (c) 2014 za. All rights reserved.
> //
>
> #include <iostream>
> #include <mysql.h>
>
> int main(int argc, const char * argv[])
> {
>
> MYSQL* mysql1=0;
> MYSQL mysql2;
>
> mysql1=mysql_init(&mysql2);
>
> std::cout << "Hello, World!\n";
>
> return 0;
> }
>
>
> It does compile and link. When I run it, the console says:
>
>> dyld: Library not loaded: libmysqlclient.18.dylib
>> Referenced from: /Users/za/Library/Developer/Xcode/DerivedData/tst2-comjjlrsptffflcrkzsbuulrggnb/Build/Products/Debug/tst2
>> Reason: image not found
>> (lldb)
>
> I created a new command line project. Replaced the content of main.cpp with the above.
> Added the library mysqlclient.a.
Did you link the library to the target? If so, it will show under the "Link Binary with Libraries" build phase. If it isn't there, add it.
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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