Changes between Initial Version and Version 1 of Support/PlatformSpecifics/Cygwin

07/11/07 17:54:16 (10 years ago)
martin (IP:



  • Support/PlatformSpecifics/Cygwin

    v1 v1  
     1= Compiling !OpenSceneGraph with Cygwin = 
     4Follows are details on usage of !OpenSceneGraph such as how to get things compiling using Cygwin. 
     6The following assumes that the !OpenSceneGraph and its dependencies (!OpenThreads, Producer, and optionally gdal) have been downloaded, either from CVS or tarballs, and installed under a common parent directory. I will call this "`/development`". 
     8== Load the proper version of the GCC Compiler == 
     9The current default gcc compiler version distributed with Cygwin is 3.4.1. Unfortunately, this version has problems dealing with the complexity of the OpenSceneGraph and Producer template usage. The libraries will compile, but they will not run. To build OSG you need to manually direct the cygwin installer to load version 3.3.3 of the gcc compiler family. 
     11== Set up the Cygwin environment == 
     12You must create some initial environment variables so that the !OpenSceneGraph build process knows where !OpenThreads and Producer are installed. 
     14The best place to locate these variables is in your shell resources file. Assuming you are using the default `bash` shell, your bash resources file will be 
     19Using your favorite text editor, add these variables to the file: 
     22export OPENTHREADS_INC_DIR=/usr/local/OpenThreads/include 
     23export OPENTHREADS_LIB_DIR=/usr/local/OpenThreads/bin 
     24export PRODUCER_INC_DIR=/usr/local/Producer/include 
     25export PRODUCER_LIB_DIR=/usr/local/Producer/bin 
     28OSG also uses environment variables to control which parts of the distribution is compiled. To compile the example programs, add the following line to the .bashrc file 
     31export COMPILE_EXAMPLES=yes 
     34Introspection does not seem to work within Cygwin, so also add this line to the .bashrc: 
     40If you have installed GDAL (required for the osgTerrain component) also add: 
     43export GDAL_INSTALLED=yes 
     46Next you must add these paths and the path to the !OpenSceneGraph installed bin directory to the systems PATH environment variable: 
     50export PATH="$PRODUCER_LIB_DIR:$PATH" 
     51export PATH="/usr/local/OpenSceneGraph/bin:$PATH" 
     54The `$PATH` variable on the end makes sure that any previously assigned paths are also included. 
     56That's all that needs to be done for the `.bashrc` file, though you could also add the variable that specifies the directory of the !OpenSceneGraph data, or any other variables that are particular to your setup. 
     59export OSG_FILE_PATH=/usr/local/OpenSceneGraph/data 
     62== Compiling !OpenThreads == 
     63Go to the !OpenThreads directory  
     66$ cd /development/OpenThreads 
     72$ make 
     73$ make install 
     76== Compiling Producer == 
     77A bug in the make system requires that we manually create the target directory for the !Producer library. Go to the library directory: 
     80cd /development/Producer/lib 
     83and create a new directory 
     86$ mkdir CYGWIN32 
     89Having done that you can build the Producer library. 
     92$ cd /development/Producer 
     93$ make 
     94$ make install 
     97== Compiling !OpenSceneGraph == 
     98First, we must work around the same bug as in !Producer: 
     101$ cd /development/OpenSceneGraph/lib 
     102$ mkdir CYGWIN32 
     105Go to the !OpenSceneGraph home directory and make, then install, !OpenSceneGraph. 
     108$ cd /development/OpenSceneGraph 
     109$ make 
     110$ make install