Menu

Building OpenFrames for Ubuntu

Eduardo Valente Yasir Majeed Khan R. S.

This page under construction

Building OpenFrames

NOTE: These instructions were tested under Ubuntu ver. 16.04.

Requirements

Ubuntu 16.04 Requirements:

  • CMake to generate build systems on a variety of operating systems. Used version 3.7.1 as tested.
    • Download and unpack cmake-3.7.1.tar.gz
    • if you have an older version of cmake remove it:
      • sudo apt remove cmake
    • sudo apt install ncurses* (required by cmake to create ccmake)
    • cd cmake-3.7.1
    • ./bootstrap && make && sudo make install (installs in /usr/local)
  • GCC (version 5.3.1 as tested). sudo apt install gcc and dependencies.
  • Choice of Git Client
  • OpenSceneGraph: See the [Building OpenSceneGraph in Ubuntu 16.04] wiki. Used version 2.7.4 as tested
  • (Optional if you want to build the Winteracter demo) Winteracter Open Motif. Download the latest static library for your architecture (32 or 64-bit) and place it in a convenient location. It is recommended to place it in the Winteracter lib directory (e.g. lib.ifi64) next to the existing Winteracter libraries.

Download OpenFrames

  1. Get the OpenFrames Git repository. See here for the link. When checking out, ensure you have selected the "develop" branch instead of the "Master" branch.
  2. The root OpenFrames folder will be referred to as [OF_FOLDER] in this page

Setup OpenFrames Build System

In Terminal:

  1. cd [OF_FOLDER]
  2. mkdir build
  3. mkdir install
  4. cd build
  5. cmake ..
  6. ccmake -D OSG_DIR:PATH=[OSG_FOLDER]\install -D CMAKE_CXX_STANDARD=11 . (terminal based cmake that displays information in a textual based interface)
    • CMAKE_INSTALL_PREFIX = \[OF_FOLDER\]/install
    • press [c] to configure
    • if any XXX_LIBRARY file path is not found edit the entry (may require advanced mode edit):
      • XXX_LIBRARY= \[OSG_FOLDER\]/install/lib64/<filename>.so see reference below.
      • press [c] to configure
    • press [q] to quit
  7. (OPTIONAL) ccmake -D WINTER_ROOT:PATH=Path to your Winteracter . (terminal based cmake that displays information in a textual based interface)
    • press [c] to configure
    • press [g] to generate
    • press [q] to quit
  8. cmake ..

If you get a CMake warning "Could NOT find wxWidgets...)", will not build wxWidgets demo it is ok!
Reference library names for missing XXX_LIBRARY entries:
OSG_LIBRARY = libosg.so
OPENTHREADS_LIBRARY = libOpenThreads.so
OSGDB_LIBRARY = libosgDB.so
OSGGA_LIBRARY = libosgGA.so
OSGPARTICLE_LIBRARY = libosgParticle.so
OSGTEXT_LIBRARY = libosgText.so
OSGUTIL_LIBRARY = libosgUtil.so
OSGVIEWER_LIBRARY = libosgViewer.so

The configure process sets up build variables that can be modified before generating the actual build system. The variable list can be organized by clicking the "Grouped" button. Set the following variables:

Build OpenFrames

In Terminal:

  1. cd \[OF_FOLDER\]\build
  2. make
  3. make install
  4. Confirm that the test1 executable is in \[OF_FOLDER\]\install\bin

Test OpenFrames

In Terminal:
1. make sure that LD_LIBRARY_PATH locates the libraries for OSG and OF
* export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:[OF_FOLDER]\install\lib:[OSG_FOLDER]\install\lib64
2. cd [OF_FOLDER]\install\bin
3. ./test1

OpenFrames is now built and installed.


Related

Wiki: Building OpenSceneGraph in Ubuntu 16.04

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.