I am a new Xcode user (version 3.2.2; Mac 10.6.7).
I have written C++ code that needs to be used in combination with commercial code. I can run the code in a terminal window, but not in Xcode (error described below). The commercial code uses a license and it also has dynamic libraries. My problem is probably related to these issues. The commercial code writers are not familiar with Xcode.
When I run the code in Xcode, this is the error:
dyld: Library not loaded:
Referenced from: /Users/me/Desktop/executableName
Reason: image not found
Trace/BPT trap
logout
To run the code successfully in a terminal window (not Xcode), I first do: 1) export LD_LIBRARY_PATH=.:$DYLD_LIBRARY_PATH 2) export [email protected]
In Xcode, I think that this should be set in: Project menu --> Edit Active Executable --> Variables to be set in the environment as:
Name: LM_LICENSE_FILE; Value: [email protected] Name: DYLD_LIBRARY_PATH; Value: /Applications/myCode/libraries/xxx
But when I do this, I get the error above. Where am I going wrong?
One further piece of information is, my code is in Code: /Applications . But my Xcode project is saved at Code: /Users/me/Desktop/executableName . The error message DOES say "referenced from" the desktop. Could this indicate a problem? What?
Thanks for any help!
I have written C++ code that needs to be used in combination with commercial code. I can run the code in a terminal window, but not in Xcode (error described below). The commercial code uses a license and it also has dynamic libraries. My problem is probably related to these issues. The commercial code writers are not familiar with Xcode.
When I run the code in Xcode, this is the error:
dyld: Library not loaded:
Referenced from: /Users/me/Desktop/executableName
Reason: image not found
Trace/BPT trap
logout
To run the code successfully in a terminal window (not Xcode), I first do: 1) export LD_LIBRARY_PATH=.:$DYLD_LIBRARY_PATH 2) export [email protected]
In Xcode, I think that this should be set in: Project menu --> Edit Active Executable --> Variables to be set in the environment as:
Name: LM_LICENSE_FILE; Value: [email protected] Name: DYLD_LIBRARY_PATH; Value: /Applications/myCode/libraries/xxx
But when I do this, I get the error above. Where am I going wrong?
One further piece of information is, my code is in Code: /Applications . But my Xcode project is saved at Code: /Users/me/Desktop/executableName . The error message DOES say "referenced from" the desktop. Could this indicate a problem? What?
Thanks for any help!