This document provides information on using Intel® IPP 6.x with Intel® C++ Compiler 11.x and GNU Compiler Collection (GCC) 4.0 in Xcode 2.4/3.0 and on the command line. In each case, the path to the Intel® IPP header files and libraries is added to the project settings or command line.
Xcode 2.4/3.0
For both dynamic and static linking, assume you are calling image processing function ippiCopy_8u_C1R from your source file.
- From the Xcode menu click Project » Edit Project Settings.
- Select the Build tab.
- Select the Header Search Paths field and type.
- /opt/intel/Compiler/11.x/0xx/Frameworks/ipp/Headers
- Select the Library Search Paths field and type.
- /opt/intel/Compiler/11.x/0xx/Frameworks/ipp/Libraries (for dynamic linking) or
- /opt/intel/Compiler/11.x/0xx/Frameworks/ipp/lib (for static linking)
- Select the Other Linker Flags field and type in the linker flags for the libraries you wish to link to.
- For dynamic linking:
- -lippi -lippcore -liomp5
- For static linking:
- -lippiemerged -lippimerged -lippsemerged -lippsmerged -lippcore
- If you have installed the Intel® compiler, read these instructions to select the Intel compiler in the Xcode IDE.
Note: If you are using dynamic linking then you need to add the path to the dynamic libraries to the system environment so that they are invoked at runtime.
- From the Xcode menu click Project » Edit active executable.
- Select the Arguments tab.
- Under Variables click the [ + ] button.
- Under the Name field type DYLD_LIBRARY_PATH.
- Under the Value field type /opt/intel/Compiler/11.x/0xx/Frameworks/ipp/Libraries.
Command line or Makefile
For both dynamic and static linking, assume you are calling image processing function ippiCopy_8u_C1R from source file test.c and set environment variable as below
IPPROOT = /opt/intel/Compiler/11.x/0xx/Frameworks/ipp
Dynamic Linking:
Intel C++ Compiler
icc test.c -I/$(IPPROOT)/Headers -L/$(IPPROOT)/Libraries -lippi -lippcor e -lguide -o test
GCC
gcc test.c -I/$(IPPROOT)/Headers -L/$(IPPROOT)/Libraries -lippi -lippcore -lguide -o test
Note: If you are using dynamic linking then you need to add the path to the dynamic libraries to the system environment so that they are invoked at runtime. You can do this from a terminal window by using the source command.
32-bit:source /$(IPPROOT)/Versions/6.x.x/ia32/tools/env/ippvars.sh
64-bit:source /$(IPPROOT)/Versions/6.x.x/em64t/tools/env/ippvarsemm64t.sh
Static Linking:
Intel C++ Compiler
icc test.c -I/$(IPPROOT)/Headers -L/$(IPPROOT)/lib -lippiemerged -lippimerged -lippsemerged -lippsmerged /$(IPPROOT)/lib/libippcore.a -o test
GCC
gcc test.c -I/$(IPPROOT)/Headers -L/$(IPPROOT)/lib -lippiemerged -lippimerged -lippsemerged -lippsmerged /$(IPPROOT)/lib/libippcore.a -o test
Note: For the Intel® IPP for Mac OS* commercial package, the Intel® IPP static and dynamic libraries are installed in the different directory / Libraries and /lib. If both are found in the same directory, the standard linker used by Xcode* first chooses a dynamic library over a static library. and if you need to use static, please link to the static libraries by using the full path and library name as shown in the examples above.
Operating System:
>Mac OS*
