Running the Executable
The following topic applies to Xcode*.
Once you have built your Xcode* project, click the
Runbutton. The output from the executable is displayed. This button runs the configuration currently associated with the button. Use the
Scheme Editorto change the configuration associated with the button.
To open the
Scheme Editor, select
Using Dynamic Libraries
Using the Dynamic Libraries does not assume that the Apple* System Integrity Protection feature purges environment variables, such as
DYLD_LIBRARY_PATH, when launching the protected process. Refer to the https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/Introduction/Introduction.html for more information. Xcode must take this into account and set the proper environment variables in the Xcode environment.
You can build your Xcode project with the
-shared-intelcompiler option to link with the Intel dynamic libraries. Build your project with the
-paralleloption to link in
libiomp5.dylib. If you do this, you need to set Xcode build option
Runpath Search pathto an appropriate folder with the compiler and performance libraries, or specify the
DYLD_LIBRARY_PATHenvironment variable in the Xcode environment.
To add the environment variable:
- Open theScheme Editorand select theRunaction.
- On theArgumentstab, underEnvironment Variables, click the+button.
- AddDYLD_LIBRARY_PATH. Set the value to the full path to the Intel compiler's/libdirectory.
If you build your project with the
-parallelcompiler option without setting the
DYLD_LIBRARY_PATHenvironment variable, a
library not founderror message results at runtime. Depending on your application, the error message may refer to a library other than the one noted in this example:
Due to the Apple System Integrity Protection you may need to set thedyld: Library not loaded: libiomp5.dylib Referenced from: /Users/test/hello_world Reason: image not found
DYLD_LIBRARY_PATHexplicitly in the launch string, or configure the
Runpath Search pathbuild option.