Xcode icc and openmp problem

Xcode icc and openmp problem

Hi

I am using Xcode 2.4.1 and gcc4.0 together with icc 9.1.037. I use the openmp feature in icc to compile a C++ dynamic library, which is then linked to a gcc built Obj-C application. It all builds and runs just fine within the Xcode environment, but the built application does not launch when double clicked from the finder in OSX Tiger. The paths to my dynamic libraries are correct. I have narrowed it down to the -openmp linker flag I set in Xcode when I build one of the dynamic libraries. If this is left out and I comment out the openmp pragmas in my code it builds and runs both in Xcode and from the finder, albiet 2 x slower due to the absence of multithreading. Could it be I need to set a path to an intel library somewhere? Or in Xcode the execution variable DYLD_LIBRARY_PATH = /opt/intel/cc/9.1.037/lib is being recognized by Xcode but somehow not being passed on to the built application.

Maybe some Xcode / icc cracks out there have some ideas.

Thanks

Andrew

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Use otool -L to find the dependencies. OS X can be quite particular about location of dynamic libraries.

The XCode list on lists.apple.com is very helpful.

Hi

Great tip. I did that on my dynamic library target where the -openmp linker flag is set. With the flag set otool says there is a dependency on libguide.dylib at root level and not in the /opt/intel/.... directory where it actually is. Is this telling me I should put a copy of libguide at the root, or is something set wrong in Xcode? I am no Unix or Darwin geek, the command line scares the hell out of me - go gently.

Thanks heaps for your help

Andrew

OK it now works. I copied libguide.dylib to the root and it launches.

Thanks very much for your help.

Andrew

Leave a Comment

Please sign in to add a comment. Not a member? Join today