on 2012 Jan 05 11:26 PM
Folks,
I'm doing an evaluation of SQL Anywhere 12 for my company. We want to use the db as a datastore behind an application using the c api to access the database. In the last couple of days I've managed to get a sample application to run on windows and 11.10 ubuntu but I can't get the same application to run on mac osx 7.
I've created a small project in Xcode 4, added the sample code and it all compiles fine.
When I run the app however I get:
Failed to load library: dlopen(libdbcapi_r.dylib, 1): image not found Could not initialize the interface!
Can anybody tell me how I setup the dynamic libraries within the Xcode project so they're available to the application at runtime?
Failing that, do I have to make a copy of the dylibs and run the install_name_tool against them to generate install names that I then use to reference them?
I'm very new to Mac programming so any help would be appreciated.
Cheers, Dan
Ok,
Turns out that even after setting up the environment variables in ./MacOSX/environment.plist, Xcode 4 overrides the DYLD_LIBRARY_PATH
for the execution environment of the application in the debugger.
You have to set the environment variables explicitly in the scheme of the application to have them available when debugging.
Having done that I can now connect successfully to a running db server.
Cheers, Dan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
10 | |
9 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.