Installation & Verification - C++ - OS X


General requirements

Installation details

Install Open Inventor from downloaded file

Set environment variables

Set up the License key

Check the installation

Documentation installation

Un-installing Open Inventor

General requirements

In order to install Open Inventor C++ verify: 

  • Root privileges: you must be allowed to write into the installation directory. If the location you have chosen (e.g., /usr/local) requires root privileges, then you must have root privileges to do the installation (and subsequent upgrades or uninstallation) or use the sudo command.
  • Verify adequate disk space: see the System Requirements Overview topic for disk space requirements.
  • Qt installation: install Qt libraries in order to have Qt environment variables and headers files for building Open Inventor samples (Using sample programs). 

Installation details

You can install the Open Inventor SDK anywhere on your system. It is highly recommended that you use an empty directory for your new Open Inventor installation. The directory may have any name, but we suggest you to choose the name "OpenInventor" with the current version number appended, e.g. "OpenInventor950". The default installation directory is /usr/local.

The complete installation contains two packages:

  • Open Inventor Toolkit:

    OpenInventorC++<product release>-MacOSX-gcc<compiler-release>-<architecture>.tar.gz

    This package contains the include files; libraries; utility, demonstration and sample programs; data files; and C++ reference manual in html format.

  • Open Inventor Documentation:

    OpenInventorC++<product release>-Documentation.tar.gz (.zip)

    This package contains the off-line version of the "Open Inventor Developer Zone" documentation web site in HTML format including the full user's guide, reference manual, installation instruction and release notes.
    This package is optional and should be used only when no internet access is available. Some features are not available in the off-line version, such as full indexed search. This package should be installed after the Open Inventor Toolkit package.

Install Open Inventor from downloaded file

The Open Inventor Toolkit for OS X is distributed as a compressed archive TAR archive (.tar.gz.). The toolkit package name is:

OpenInventorC++<product release>-MacOSX-gcc<compiler release>-<architecture>.tar.gz

For example  OpenInventorC++950-MacOSX-gcc42-x86_64.tar.gz means:
   Product release = 9.5.0
   Compiler release = gcc 4.2
   Architecture = x86 64 bit (AMD64 and Xeon64)

Copy the file to OpenInventor950 folder then uncompress and untar the package. From the shell, you could type:

cd /usr/local/OpenInventor950

tar xzvf OpenInventorC++950-MacOSX-gcc42-x86_64.tar.gz

Mac OIV tree folder

Note: you could double-click from the finder and it will uncompress and untar automatically. This command will make the folder /usr/local/OpenInventor950/OpenInventorC++950-MacOSXgcc42-x86_64 containing the archive files.

Set environment variables

Open Inventor environment variables

in order to use Open Inventor, all users must initialize several environment variables that are neecssary to compile, link, and run programs. 

To set a variable in a local window running the bash shell (the OS X default), use the "export" command:

export VARIABLE_NAME="value"

When using the csh or tcsh shells, use "setenv":

setenv VARIABLE_NAME "value"

Note: these commands set the local variables in the user's .bashrc or .cshrc files, this means that if you want to run a sample or an Open Inventor program you have to run it form the shell where you set the variables. 

The Open Inventor variables are:
  • OIVHOME to <path_to_your_Open_Inventor_installation>
    For example: setenv OIVHOME /usr/local/OpenInventor950
  • OIVARCH to <architecture directory>
    For example: setenv OIVARCH arch-MacOSX-x86_64-gcc42-release

OIVARCH is used to switch between differents architectures or configuration (Release/Debug) libraries.

Other optional environment variables specific to Open Inventor and its extensions can be set. Please refer to SoPreferences in the Reference Manual for more details.

System environment variables

  • The shared library path (DYLD_LIBRARY_PATH) must be specified. This contains the list of directories searched at run-time for the shared libraries.

For example, to set the library path: 


  • The QT environment variables be set in order to build sample programs that use Qt.

Set up the License key

Your Open Inventor software is computer ID locked. Please read the Licensing/Setting up a node-locked license section for more details.

If you want to use a password.dat file outside the OIVHOME folder you have to add the environment variable:


Check the installation

The $OIVHOME/$OIVARCH/bin directory contains a test program. To check that the installation is correct, type following commands:



The program opens a window and displays a scene graph.

Run $OIVHOME/$OIVARCH/bin/IVBrowser to run all the demos and verify the related code.

If you are not able to run the programs you can try using chmod to change the access permission to execute the file: chmod +x <filename> or chmod -R +x * to make the modification for all files

Documentation installation

The offline documentation is distributed in a separate package named OpenInventorC++<product release>-Documentation.tar.gz

To install the documentation, copy the file into the Open Inventor installation folder and then uncompress and untar the archive, for instance:

cd /usr/local/OpenInventor950/

tar xzvf OpenInventorC++950-Documentation.tar.tar.gz

Using sample programs

The Open Inventor toolkit comes with hundreds of sample programs that demonstrate its features. The source code for these programs is located in the $(OIVHOME)/src directory.
All sample programs come built in the release version and can be run after installation when the Open Inventor environment variables are properly set.
The Samples Browser program ($OIVHOME/$OIVARCH/bin/IvBrowser) can be used to browse these programs, show the source code, run them and read their documentation if available.

While pre-built binaries of the Open Inventor samples are provided, you may freely reuse or modify their source code for experimentation. You will need to generate makefiles using the CMake file (CMakeLists.txt) provided in each directory. Please read the Build samples instructions for more details. 

Note: for OS X, Qt is not optional. You can check the compatibility version of Qt for the latest Open Inventor release and download Qt library. If you install the Qt packages, it is recommended that you use the shared libraries delivered with Open Inventor in $OIVHOME/lib as described below:


Use cmake-gui using following settings:

source code = $OIVHOME/src
build folder for binaries = "create new folder to save the makefile"

After Configure command you could change some cmake variables like:

Un-installing Open Inventor

To uninstall Open Inventor, remove the installation folder. For Qt library, if you want to remove it, check on the official site or use /Developers/Tools/ with administrative privileges.