• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OS X 10.9.4, Xcode 5.1.1 and mysql-5.6.20-osx10.8-x86_64
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: OS X 10.9.4, Xcode 5.1.1 and mysql-5.6.20-osx10.8-x86_64
  • Next by Date: Re: OS X 10.9.4, Xcode 5.1.1 and mysql-5.6.20-osx10.8-x86_64
  • Previous by thread: Re: OS X 10.9.4, Xcode 5.1.1 and mysql-5.6.20-osx10.8-x86_64
  • Next by thread: Resolving link errors from using two static libs that contain the same symbols
  • Index(es):
    • Date
    • Thread