|Version 1 (modified by martin, 6 years ago)|
- Developer Blog
- Mailing Lists
- Getting Started
- Platform Specifics
- User Guides
- Programming Guides
- Reference Guides
- Tips And Tricks
- Knowledge Base
- Trac Usage Examples
- TracGuide Documentation
- Software Patents
- Software Patents Europe
Follows are details on usage of OpenSceneGraph such as how to get things compiling using Mingw.
Compiling OpenSceneGraph with Mingw and MSYS
First you must create some initial environment variables so that the OpenSceneGraph build process knows where OpenThreads and Producer are installed. The best place to locate these variables is in a profile initialization script file. MSYS has one in it's /etc directory but it best to create a local one in the /home/yourusername directory located in the main MSYS folder.
So create a file in a text editor, name it .profile and save it in the /home/yourusername directory. MSYS will automatically process this file when the console is started.
Add these variables to the file:
export OPENTHREADS_INC_DIR="/usr/local/OpenThreads/include" export OPENTHREADS_LIB_DIR="/usr/local/OpenThreads/bin" export PRODUCER_INC_DIR="/usr/local/Producer/include" export PRODUCER_LIB_DIR="/usr/local/Producer/bin"
Next you must add these paths and the path to the OpenSceneGraph installed bin directory to the systems PATH environment variable:
The $PATH variable on the end makes sure that any previously assigned paths are also included.
Thats all that needs to be done for the .profile script 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.
The above path is specific to where I put the data, change accordingly to where your data resides.
Now startup the MSYS console and if you've not already done so, make and install OpenThreads and Producer.
Before building Producer, create a new folder called MINGW32 in the Producer/lib directory.
Similarly for OpenSceneGraph, create a new folder called MINGW in OpenSceneGraph/lib directory.
The build process will fail if this is not done, not sure why this happens.
Everything should be in place now, so just cd into the OpenSceneGraph directory and type make, hopefully it should build successfully.