- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
This topic is a follow up on :
http://software.intel.com/en-us/forums/topic/494329
that I have opened myself and only partially solved.
Indeed :
Everything I wrote there works at least when I run the executable "from XCODE". (That is when i do a command+R in the xcode project.)
When I find the directory the executable console app is built in, and double click on it there, I receive this message :
Last login: Sun Nov 24 17:05:19 on ttys002
MacBook-Pro-de-MisesEnForce:~ MisesEnForce$ /Users/MisesEnForce/Library/Developer/Xcode/DerivedData/THECONSOLEAPPLICATION-hknajgycvjjcotdtkeeyxbzmtfty/Build/Products/Debug/THECONSOLEAPPLICATION ; exit;
dyld: Library not loaded: libmkl_sequential.dylib
Referenced from: /Users/MisesEnForce/Library/Developer/Xcode/DerivedData/THECONSOLEAPPLICATION-hknajgycvjjcotdtkeeyxbzmtfty/Build/Products/Debug/THECONSOLEAPPLICATION
Reason: image not found
Trace/BPT trap: 5
logout
[Process completed]
Any idea is welcome
Thx in advance,
Kind Regards,
Pierre
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pierre,
The key problem is that the application requires environment path DYLD_LIBRARAY_PATH. You do the setting in Xcode environment, but not in double click. that is why you can run it from xcode, but can't double click the application directly.
Generally, under command windows, please source intel compiler vars.sh or export DYLD_LIBRARY_PATH=/opt/intel/mkl/xxx first, then go to your application's directory, start it by ./yourapp.exe.
The below article is out of date, but note 1 and note 2 should be helpful on your problem and 494329 ( libxxx. a need the entire path)
http://software.intel.com/en-us/articles/intel-math-kernel-library-for-mac-os-compiling-and-linking-with-xcode
Best Regards,
Ying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ying,
First thx a lot because doing :
export DYLD_LIBRARY_PATH=/opt/intel/composer_xe_2013_sp1.1.103/compiler/lib:/opt/intel/composer_xe_2013_sp1.1.103/mkl/lib
before doing
./TheExecutable
worked indeed, but... I find it a bit unelegant : I don't want to force the users of my executable doing that export everytime then want to run the executable for a couple of time etc... Is there a way to "pack" that
export DYLD_LIBRARY_PATH=/opt/intel/composer_xe_2013_sp1.1.103/compiler/lib:/opt/intel/composer_xe_2013_sp1.1.103/mkl/lib
into the executable, so that it could be done at runtime ? (***) (By the way, if I want to create a dylib linking to the mkl, I think that it must be mandatory to be able to "pack" that export command into the dylib somehow, isn't it ?)
By the way, I must admit that I don't really understand notes 1 & 2 of the link
you have pointed me to. Are these notes solution to my question (***) ?
Kind Regards,
Pierre
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pierre,
If you prefer to use the dynamc library (dylib) you may try to edit system environment setting file , for example. http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x, Thus you can launch your exe at any time.
Or use static library, like libmkl_core.a, then you don't need to set the run-time environment variable DYLD_LIBRARY_PATH each times.
When static library link, you need use full path and library name. ( it is not correct syntax, -L -libmkl_core.a )
Best Regards,
Ying
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page