Click here to Skip to main content
15,881,092 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Okay, so, this will hopefully be a quick question.. and before you nag me about how others have asked this question before, I assure you that I've looked deeply into those articles and read the Qt documentation, but the explanations still befuddle me. To be honest, I just got this Mac and don't have much development experience using it. Anyway, here it goes...

When I try using the MySQL C Connector in my Qt GUI app, my app and all of its dependent libraries are built without issue. However, when I try to RUN my app, I get the following error:

dyld: Library not loaded: libmysqlclient.18.dylib
  Referenced from: /Users/rxpictures/Documents/Qt Projects/SQLProject/SQLProject.app/Contents/MacOS/SQLProject
  Reason: image not found
The program has unexpectedly finished.


I have the file libmysqlclient.18.dylib in my MySQL folder, and even tried importing it as an external library. However, I'm still getting this message and it's driving me NUTS! I originally wrote the program on Windows and it worked fine then.

Any ideas how I can fix this? What is even causing this? I read something about using an ln command in a terminal to create a link to the file in Mac's lib folder or the Qt lib folder or something like that... but I don't have much experience with the Mac command line and am not sure if I know where the lib folder on Mac (or Qt) is. So, any help would be greatly appreciated. Thanks in advance!

Also, I should mention I am using MAMP (www.mamp.info) for my MySQL capabilities.
Posted
Updated 16-Aug-13 15:41pm
v2
Comments
The_Inventor 17-Aug-13 3:44am    
There must be some 'image' file that was used before in the original program, that it is not finding, that the lib file uses.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900