Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jamdr

macrumors 6502a
Original poster
Jul 20, 2003
659
0
Bay Area
I downloaded the dylib's from mysql.com and I added them to my Xcode project, along with the header files. However, whenever I try to compile, I get:

Code:
dyld: Library not loaded: libmysql.16.dylib
Reason: image not found

I guess I'm not adding the dynamic library to my project properly. Has anyone does this before?
 
I'm just right clicking on Linked Frameworks and select Add Existing Frameworks... and selecting the libmysql.dylib. Is there something else I should be doing?

I've seen other threads on this forum where people mention they are using this library with Xcode, so if any of you are around, please help :eek:
 
I haven't used this specific library, but here's a tidbit: a dylib is not a framework. They are linked differently. Next, the "Linked Frameworks" "folder" isn't really how you actually tell Xcode to link to the library. If you "Get Info" on the dylib in Xcode, then click the "Targets" tab, you'll see a list of the targets in your project. You should check the target(s) you want to link against that library.

There's more to be done when it comes to actually shipping the application, but it's not necessary for building and debugging. (see "otool" and "install_name_tool".)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.