Xcode problem: where/how to set dynamic library and license paths?


I am an Xcode newbie (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:

1
2
3
4
5
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 LM_LICENSE_FILE=1234@lic-xxx.xxx.xx

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: 1234@lic-xxx.xxx.xx Name: DYLD_LIBRARY_PATH; Value: /Applications/myCode/libraries/xxx

But when I do this, I get the error above.

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?
LD_LIBRARY_PATH=.:$DYLD_LIBRARY_PATH
Name: DYLD_LIBRARY_PATH; Value: /Applications/myCode/libraries/xxx
What happened in the middle?
Thanks for your response Helios. What do you mean by "the middle?" If you mean, why is the path split up, this seems to be an Xcode thing. The documentation says that "DYLD_LIBRARY_PATH" should be put in the "name" field. The path should be put next to it. I am a new Xcode user though, so perhaps I am mistaken and this is what my problem is.
I mean, why did you name one variable LD_LIBRARY_PATH and the other DYLD_LIBRARY_PATH?
Topic archived. No new replies allowed.