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:
dyld: Library not loaded:
Referenced from: /Users/me/Desktop/executableName
Reason: image not found
Trace/BPT trap

Before I successfully run in a terminal window, I do this first:
2) export

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: 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
. But my Xcode project is saved at
. 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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.