Eclipse MingW
From Ogre Wiki
http://www.ogre3d.org/wiki/index.php/Eclipse_MingW
Contents[hide] |
The Idea
Our goal is to create Ogre3D applications in Eclipse, a programming environment written in java. We'll need the following components.
- Eclipse
-
- A C/C++ extension to Eclipse, CDT
- To program C++ in Eclipse, we install the CDT extension.
- A compiler, GCC (MinGW)
- CDT works with GCC, the gnu compiler collection, originally written for unix platforms (like linux or FreeBSD). To run it on windows, we need to create enough of a unix environment on windows to allow gcc to run. We have two options. One option is Cygwin, which simply translates all unix system calls to windows system calls, allowing all unix programs to run on windows with a minimum of effort. The second option, the one we'll use, is MinGW. MinGW is a collection of linux development tools (like compilers and header files) that together comprises a port of gcc to windows. We'll use a specially compiled version of MinGW that plays nice with Ogre.
- MSYS
- Make, the tool that is traditionally used to configure complex gcc builds requires certain unix system commands. MSYS creates these under windows. In a nutshell, you'll be ale to use rm as well as del and ls as well as dir.
- The Ogre SDK, the Code::Blocks version
- To create ogre programs, we need the ogre SDK. There are several precompiled SDK's available for different development platforms. There is no SDK specifically for Eclipse, but there is one for Code::Blocks (another programming environment) and MinGW, which will work just as well with Eclipse.
Install Eclipse
The Core
The basic eclipse system will give you a Java development environment that can be extended for other languages. It has no installer that puts it in C:program files or anything, just extract it to a directory and run Eclipse.exe.
You can download the Eclipse IDE for C/C++ Developers, with the C/C++ Development Tools Plugin already included in the package, and without any other unnecessary things.
- Download Eclipse
- Extract It
- Run Eclipse.exe (The workspace is the default directory for your code.)
C/C++ Development Tools Plugin
If you already have Eclipse installed or if you prefer to install CDT separately, this is how you can install the C/C++ Development Tools (CDT) Plugin
- Click Help > Software Updates > Find and Install
- Select the "Search for new features to install" option and click Next
- Check "Europa Discovery Site" and click Finish ("Callisto Discovery Site" for Eclipse<3.3)
- Expand "Europa Discovery Site" and Check "C/C++ Development Tools"
- Click through the Dialogs to Install and Click Yes when asked whether to reset the workspace
Install MinGW
MinGW is a windows port of gcc. It lives entirely in one directory. We'll use c:mingw. You can put this on another drive, but it has to be x:mingw, for the remainder of this document we will assume that c: is used. In this directory there are several subdirectories like bin and libs. MinGW consists of several packages (distributed in the form of tar.gz archives) that each have files in one or more of these directories. To install a new package, simply extract it to x:mingw, and the files will be put in the right directories.
- Instead of installing the required packages separately, we will install the MinGW toolbox, which contains all packages, and is compiled specially for Ogre (the regular MinGW will not work). Download this file and run it.
- To allow the MinGW programs from c:mingwbin to be run from anywhere, we
need to add this directory to the windows PATH variable.
- Right-Click My Computer > Properties > Advanced > Environmental Variables>
- Click the Path variable, (under System Variables or User Variables, depending on whether you want it set for all user, or just you respectively). Click Edit. Add ";c:mingwbin" (without the quotes) to the variable value. The semi-colon is used to separate directories.
MSYS installation
We need to install MSYS to have access to linux-style shell commands.
- Download MSYS-1.0.10.exe
- Install it somehwere. We'll use c:msys
- the post installation script will ask you where the mingw installation is located. This is c:mingw
- To allow the MSYS programs from c:msysbin to be run from anywhere, we need
to add this directory to the windows PATH variable too.
- Right-Click My Computer > Properties > Advanced > Environmental Variables>
- Click the Path variable. Click Edit. Add ";c:msysbin" (without the quotes) to the variable value. Note, if you chose some other directory for the installation, and it has spaces in the path, enclose the directory in quotes.
Check if it works
To check if everything works, fire up a command prompt (start a fresh one after you set the path variables) whit Start Menu > Run... > Type 'cmd'. Type the following commands.
- gcc -v
- rm --version
For both files, you should get some version information. If you get 'is not recognized as an internal or external command, operable program or batch file', windows can't find the programs. Check if the Path variable is set correctly.
Install OgreSDK
To create Ogre3D software we must install the Ogre SDK.
- Download OGRE SDK for Code::Blocks + MinGW C++ Toolbox
- Install it somewhere. We'll use c:OgreSDK
OgreSDK Configuration
In eclipse, go to Window > Preferences > C/C++- > Environment
(This was Window > Preferences > C/C++- > PathEntry Variables in CDT<4.0 and Eclipse<3.3)
Click the 'New...' button
Put this info:
- Name: OgreSDK
- Location: C:OgreSDK
You may also want to stop Eclipse from auto-building projects: Project > uncheck 'Build Automatically'
Creating a New Project
Now, it's time to set up a new project in Eclipse, and see if everything works.
- File > New > Project
- C++ > C++ Project (C++ > Managed make project in older versions of Eclipse+CDT)
- Set a name for your project. We'll use OgreTest
- Select "Executable" in the Project Types tree to the left
- Select "MinGW GCC" in the Toolchain list to the right
- Press Next. You will see two build configurations, leave them both checked.
There are two different sets of options; the first, 'Debug', is used during programming. It doesn't any optimization, and allows debugging of the compiled file in several ways. The second, 'Release', is used to create the finished executable, that you will distribute to other people. It tells the compiler to optimize, and doesn't allow any debugging is anything goes wrong.
Build Configuration
The gcc C++ compiler and C++ linker have an ocean of possible configuration option. We'll need to set ours up quite carefully, and differently for each one of the Build Configurations (Debug and Release).
- Right-Click your Project in the Left Pane and Click Properties
- Select C/C++ Build > Settings on the Left.
- Set the Configuration Pull-Down to Release or Debug and in the Tool Settings tab, enter the options from the table below in the appropiate section of the small left tree:
GCC C++ Compiler
| Debug | Release |
|---|---|
| Preprocessor | |
|
Add the following to the Defined Symbols (-D)
|
Add the following to the Defined Symbols (-D)
|
| Directories | |
|
Add the following to the Include Paths (-I)
Note: Add this with quotes |
Add the following to the Defined Symbols (-I)
Note: Add this with quotes |
| Miscellaneous | |
|
Put the following in the 'other flags text box:
|
Put the following in the 'other flags text box:
|
GCC C++ Linker
| Debug | Release |
|---|---|
| Libraries | |
|
Add the following to the libraries (-l)
|
Add the following to the libraries (-l)
|
|
Add the following to the library search path (-L)
Note: Add this with quotes |
Add the following to the library search path (-L)
Note: Add this with quotes |
| Miscellaneous | |
|
Add the following to the Other Options (-Xlinker[option]
|
Add the following to the Other Options (-Xlinker[option]
|
Notes
- Eclipse will build with the Configuration you leave selected. You can also change this under Project > Active Build Configuration
- OGRE_HOME is a pre-defined environment variable setup by the SDK installer. OGRE_HOME points to the directory where the SDK is installed. You can use ${OGRE_HOME} within your build options when setting up paths to specific directories with the SDK that you will need to access.
Basic Tutorial 1
We can test our project with Basic Tutorial 1
- Make a New C++ Source File, name it something like Tutorial1.cpp
- Copy the Code from Basic Tutorial 1#Getting Started into the file
- We need to tell the compiler where ExampleApplication.h is.
- Under the Project Properties
- C/C++ Build > Directories > Include Paths, Add:
- "${OGRE_HOME}samplesinclude"
- Click Project > Build All
The project will compile Tutorial1.cpp into OgreTest.exe, and put it in your workspace under OgreTest/Debug, or OgreTest/Release, depending on your build configuration.
Required Files
If you try running your program it will complain about missing DLLs.
- If your .exe is in the Release directory, copy all files from c:OgreSDKbinRelease to it. For the Debug directory, copy all files from c:OgreSDKbinDebug.
If you try running now, Ogre will give an error about not finding the media directory.
- Copy the c:OgreSDKmedia Folder to your Workspace directory, (2 directories
below your .exe)
Note: The resources.cfg file tells Ogre where to find these media files. If you wish to put this folder somewhere else you need to edit this file.
Note: Cleaning your project will remove all these files, I'm not sure how to change this behavior
DirectX
If you don't have the DirectX Runtime installed you will get an error about a missing d3dx9_30.dll or d3dx9d_30.dll (for Debug builds). To get this dll, you need to install DirectX, or the DirectX SDK for Debug builds. Note that the dll's needed for Ogre 140 end in 30. For other versions of Ogre, other versions of this dll are needed.
End-Users just need the Latest DirectX Runtime (Supplies the d3dx9_##.dll file needed for your Release build):
- DirectX End-User Runtime August Redist Versions 24-30?
- For a quick and dirty solution you can get the individual DLLs at this site
To Debug you need the DirectX SDK
(Supplies the d3dx9d_##.dll file needed for your Debug
build):
Note: The SDKs come with only one d3dx9d_##.dll file.
April, June, and August are 30. February is 29.
- DirectX SDK February Redist Version 29 only
- DirectX SDK August Redist Version 30 only
Christian Audigier Women's Clothings ,Christian Audigier Women's Clothes ,
Cheap Christian Audigier Women's Clothings ,Cheap Christian Audigier Women's Clothes ,
Discount Christian Audigier Women's Clothings ,Discount Christian Audigier Women's Clothes ,
Wholesale Christian Audigier Women's Clothings ,Wholesale Christian Audigier Women's Clothes ,
Cheap Christian Audigier Womens ,Discount Christian Audigier Womens ,Wholesale Christian Audigier Womens
Christian Audigier Bikini , Christian Audigier Swimwear , Christian Audigier Bathing Suits ,
cheap Christian Audigier Bikini , Cheap Christian Audigier Swimwear , Cheap Christian Audigier Bathing Suits ,
Wholesale Christian Audigier Bikini , Wholesale Christian Audigier Swimwear , Wholesale Christian Audigier Bathing Suits ,
Discount Christian Audigier Bikini , Discount Christian Audigier Swimwear , Discount Christian Audigier Bathing Suits ,
Christian Audigier Womens T-shirts , Christian Audigier Women's Tshirts ,Christian Audigier Womens Tees,
Cheap Christian Audigier Womens T-shirts , Cheap Christian Audigier Women's Tshirts ,Cheap Christian Audigier Womens Tees,
Discount Christian Audigier Womens T-shirts , Discount Christian Audigier Women's Tshirts ,Discount Christian Audigier Womens Tees,
Wholesale Christian Audigier Womens T-shirts , Wholesale Christian Audigier Women's Tshirts ,Wholesale Christian Audigier Womens Tees,
Christian Audigier Womens Hoodies ,Christian Audigier Women's Hoodie,Christian Audigier Lady's Hoody,
Cheap Christian Audigier Womens Hoodies ,Cheap Christian Audigier Women's Hoodie,Cheap Christian Audigier Lady's Hoody,
Discount Christian Audigier Womens Hoodies ,Discount Christian Audigier Women's Hoodie,Discount Christian Audigier Lady's Hoody,
Wholesale Christian Audigier Womens Hoodies ,Wholesale Christian Audigier Women's Hoodie,Wholesale Christian Audigier Lady's Hoody,
Christian Audigier Womens Suits ,Christian Audigier Women's Suits ,
Cheap Christian Audigier Womens Suits ,Cheap Christian Audigier Women's Suits ,
Discount Christian Audigier Womens Suits ,Discount Christian Audigier Women's Suits ,
Wholesale Christian Audigier Womens Suits ,Wholesale Christian Audigier Women's Suits ,



We are profesional wholesale of sports jerseys, we have kinds of jerseys, including NFL Jerseys , MLB Jerseys , NBA Jerseys , NHL Jerseys , Soccer Jersey ,
Football Jerseys,Baseball Jerseys,Hockey Jerseys, basketball Jerseys, .Etc.
You will have a nice wholesale price from us.Dont hesitate to contact us asap
sale@cheapmuch.com
www.cheapmuch.com
Wholesale List:
Womens Running Shoes
Wholesale Mens Shoes
Cheap Men's Clothings
Wholesale women's Clothings
Wholesale Casual Shoes
Wholesale Hats
wholesale Jerseys
Wholesale Designer Handbags
Wholesale Designer Sunglasses
Wholesale electronics
Wholesale belts
Wholesale Childrens Clothings
Wholesale hair wing
Jordan Shoes