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

Show
Ignore:
Timestamp:
07/11/07 17:54:16 (7 years ago)
Author:
martin (IP: 81.178.2.19)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Support/PlatformSpecifics/Cygwin

    v1 v1  
     1= Compiling !OpenSceneGraph with Cygwin = 
     2[[TracNav(TracNav/SupportTOC)]] 
     3 
     4Follows are details on usage of !OpenSceneGraph such as how to get things compiling using Cygwin. 
     5 
     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`". 
     7 
     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. 
     10 
     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. 
     13         
     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 
     15{{{ 
     16~/.bashrc 
     17}}} 
     18 
     19Using your favorite text editor, add these variables to the file: 
     20 
     21{{{ 
     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 
     26}}} 
     27 
     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 
     29 
     30{{{ 
     31export COMPILE_EXAMPLES=yes 
     32}}} 
     33 
     34Introspection does not seem to work within Cygwin, so also add this line to the .bashrc: 
     35 
     36{{{ 
     37export COMPILE_INTROSPECTION=no 
     38}}} 
     39 
     40If you have installed GDAL (required for the osgTerrain component) also add: 
     41 
     42{{{ 
     43export GDAL_INSTALLED=yes 
     44}}} 
     45 
     46Next you must add these paths and the path to the !OpenSceneGraph installed bin directory to the systems PATH environment variable: 
     47 
     48{{{ 
     49export PATH="$OPENTHREADS_LIB_DIR:$PATH" 
     50export PATH="$PRODUCER_LIB_DIR:$PATH" 
     51export PATH="/usr/local/OpenSceneGraph/bin:$PATH" 
     52}}} 
     53 
     54The `$PATH` variable on the end makes sure that any previously assigned paths are also included. 
     55 
     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. 
     57 
     58{{{ 
     59export OSG_FILE_PATH=/usr/local/OpenSceneGraph/data 
     60}}} 
     61 
     62== Compiling !OpenThreads == 
     63Go to the !OpenThreads directory  
     64 
     65{{{ 
     66$ cd /development/OpenThreads 
     67}}} 
     68 
     69run: 
     70 
     71{{{ 
     72$ make 
     73$ make install 
     74}}} 
     75 
     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: 
     78 
     79{{{ 
     80cd /development/Producer/lib 
     81}}} 
     82 
     83and create a new directory 
     84 
     85{{{ 
     86$ mkdir CYGWIN32 
     87}}} 
     88 
     89Having done that you can build the Producer library. 
     90 
     91{{{ 
     92$ cd /development/Producer 
     93$ make 
     94$ make install 
     95}}} 
     96 
     97== Compiling !OpenSceneGraph == 
     98First, we must work around the same bug as in !Producer: 
     99 
     100{{{ 
     101$ cd /development/OpenSceneGraph/lib 
     102$ mkdir CYGWIN32 
     103}}} 
     104 
     105Go to the !OpenSceneGraph home directory and make, then install, !OpenSceneGraph. 
     106 
     107{{{ 
     108$ cd /development/OpenSceneGraph 
     109$ make 
     110$ make install 
     111}}} 
     112