Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4040726
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:47:20+00:00 2026-05-20T12:47:20+00:00

I have the library libmysqlclient.16.dylib , which I need to have on the computer

  • 0

I have the library libmysqlclient.16.dylib, which I need to have on the computer where my application is running, or I will get the following error:

Dyld Error Message: Library not
loaded:
/usr/local/mysql/lib/libmysqlclient_r.16.dylib
Referenced from: /Users/alex/snow
server 3.app/Contents/MacOS/snow
server Reason: image not found

This is very strange, because I linked the binary with this library.

If the same dylib exists on the target computer, but in a different version (for example, Snow Leopard Server), I get an error like the following:

Dyld Error Message: Library not
loaded:
/usr/local/mysql/lib/libmysqlclient_r.16.dylib
Referenced from: /Users/alex/snow
server 3.app/Contents/MacOS/snow
server Reason: no suitable image
found. Did find:
/usr/local/mysql/lib/libmysqlclient_r.16.dylib:
mach-o, but wrong architecture

I’d like to link against this library, but not have to use the local copy of it. Is this possible?

UPDATE – when i try to using install_name_tool i don’t have any changes:

bash-3.2# otool -L
libmysqlclient.16.dylib
libmysqlclient.16.dylib:
libmysqlclient.16.dylib
(compatibility version 16.0.0, current
version 16.0.0)
/usr/lib/libSystem.B.dylib
(compatibility version 1.0.0, current
version 123.0.0)
/usr/lib/libz.1.dylib (compatibility
version 1.0.0, current version 1.2.3)
/usr/lib/libstdc++.6.dylib
(compatibility version 7.0.0, current
version 7.9.0) bash-3.2#
install_name_tool -change
libmysqlclient.16.dylib
@executable_path/../Frameworks/libmysqlclient.16.dylib
Usage: install_name_tool [-change old
new] … [-rpath old new] …
[-add_rpath new] … [-delete_rpath
old] … [-id name] input bash-3.2#
install_name_tool -change
libmysqlclient.16.dylib
@executable_path/../Frameworks/libmysqlclient.16.dylib
libmysqlclient.16.dylib bash-3.2#
otool -L libmysqlclient.16.dylib
libmysqlclient.16.dylib:
libmysqlclient.16.dylib
(compatibility version 16.0.0, current
version 16.0.0)
/usr/lib/libSystem.B.dylib
(compatibility version 1.0.0, current
version 123.0.0)
/usr/lib/libz.1.dylib (compatibility
version 1.0.0, current version 1.2.3)
/usr/lib/libstdc++.6.dylib
(compatibility version 7.0.0, current
version 7.9.0)

SOLUTION
i was add a script into build phase:
install_name_tool -change libmysqlclient.16.dylib @executable_path/../Frameworks/libmysqlclient.16.dylib $CONFIGURATION_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME
this was fixed a libpath for executive product and working fine with lib in bundle.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T12:47:21+00:00Added an answer on May 20, 2026 at 12:47 pm

    First, you’ll want to make sure that you’re copying this library into your application bundle so that it will be available on the user’s machine. To do this, add a new Copy Files build phase for your application to copy bundled frameworks. Within the properties of that build phase, make sure that the destination is Frameworks. Drag your library from your project into that build phase to make sure that it is packaged with your application.

    You may also need to modify the library itself so that it points to the correct location within the application bundle. In the past, I’ve done this by making a copy of the library within my project’s directory, then using the following command to modify where the library expects to find itself:

    install_name_tool -id @executable_path/../Frameworks/libftd2xx.0.1.0.dylib libftd2xx.0.1.0.dylib
    

    In this case, the library being modified was called libftd2xx.0.1.0.dylib.

    You can use the command

    otool -L [library filename]
    

    to see the path where the library expects itself to be found and determine if this change needs to be made.

    Make sure that you change the path on the library within your Xcode project so that you will be linking against this new, modified version of the library residing within your project directory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a library, which uses Common.Logging. I need to get my code called
I have gdata library install on my ArchLinux, and a simple application which imports
while running rake db:migrate i get the following error : rake db:migrate (in /Users/hrastogi/ruby_project/contactlist)
Possible Duplicate: Library not loaded: libmysqlclient.16.dylib error when trying to run 'rails server' on
I have a library with an Interface. Public Interface Progress { int ProgressValue{get;set;}, string
I have a library of dubious origins which is identified by file as a
I have a Library ( DLL ) that has a method with the following:
I have a library that I'm trying to get working with rails 3 (specifically
I have the following files in this directory: ~/test/lib/liblost.dylib ~/test/include/lost.h I am trying to
I have a library, foo, for which I've produced a static object (libfoo.a). I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.