# Running the Executable

Once you have built your Xcode* project, click the Run button. The output from the executable is displayed. This button runs the configuration currently associated with the button. Use the Scheme Editor to change the configuration associated with the button.

### Tip

To open the Scheme Editor, select Product > Scheme... > Edit Scheme...

## 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-intel compiler option to link with the Intel dynamic libraries. Build your project with the -qopenmp or -parallel option to link in libiomp5.dylib. If you do this, you need to set Xcode build option Runpath Search path to an appropriate folder with the compiler and performance libraries, or specify the DYLD_LIBRARY_PATH environment variable in the Xcode environment.

To add the environment variable:

1. Open the Scheme Editor and select the Run action.
2. On the Arguments tab, under Environment Variables, click the + button.
3. Add DYLD_LIBRARY_PATH. Set the value to the full path to the Intel compiler's `/lib` directory.

### Note

If you build your project with the -shared-intel, -qopenmp, or -parallel compiler option without setting the DYLD_LIBRARY_PATH environment variable, a library not found error message results at runtime. Depending on your application, the error message may refer to a library other than the one noted in this example:

    dyld: Library not loaded: libiomp5.dylib
    Referenced
    from: /Users/test/hello_world
    Reason: image not found

Due to the Apple System Integrity Protection you may need to set the `DYLD_LIBRARY_PATH` explicitly in the launch string, or configure the Runpath Search path build option.
Parent topic: Using Xcode* (macOS*)

## See Also

shared-intel option
openmp, Qopenmp option
parallel, Qparallel option