mardi 30 juin 2015

netBeans project, OSx, C executable claims dylib can not be found


It will not surprise me to find this is a duplicate but I have not found the dup yet...

I have a NetBeans "project" with three sub-projects... actually three connected, but separate projects: ProjectExectuable, libProject.a, and project.dylib.

  • "libProject.a" is a static library that compiles and uses ar and ran lib to build.
  • ProjectExecutable and project.dylib link against libProject

All three compile and build. When I try to execute ProjectExecutable I get the message:

dyld: Library not loaded: /usr/local/mysql/lib/libmysqlclient.18.dylib
Referenced from: /path/to/ProjectExecutable/dist/Debug/GNU-MacOSX/./ProjectExecutable
Reason: image not found
Trace/BPT trap: 5

There is no /usr/local/mysql on the machine. my local install path is: /usr/local/mysql-connector-c -- this is a symlink to a similar dir with a longer name that includes the version.

I am not, as far as I can tell, referencing the /usr/local/mysql/ path anywhere in the libProject or ProjectExecutable NB "projects". I have done a find with a grep on the workspace and only the binary executable and the created libs "match".


Aucun commentaire:

Enregistrer un commentaire