RobBobSmith -3 Newbie Poster

Hi all:

I would be very grateful for advice on an Xcode (3.2.2) problem. I use Mac OS X 10.6.7.

I have written C++ code that requires outside code. The outside code 1) requires a license and 2) has dynamic libraries. The outside code does run in a terminal, but I can't get it to run in Xcode. I probably don't understand how to set the path to the dynamic libraries in Xcode and I may also not understand how to set license information.

When I run the code in Xcode, I get this error:
Code:
dyld: Library not loaded:
Referenced from: /Users/me/Desktop/executableName
Reason: image not found
Trace/BPT trap
logout

Before I successfully run in a terminal window, I do this first:
1) export LD_LIBRARY_PATH=.:$DYLD_LIBRARY_PATH
2) export LM_LICENSE_FILE=1234@lic-xxx.xxx.xx

In Xcode, my understanding is that this information (1 and 2 above) 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

Can someone suggest where I am going wrong? Is this NOT how to set dynamic library paths and/or license information in Xcode?

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? Should my code and Xcode project be in the same place?

Any hints would be very appreciated.