Setting up Irrlicht with Eclipse and MinGW on Vista

A forum to store posts deemed exceptionally wise and useful
Post Reply
Nuki
Posts: 1
Joined: Sat Dec 22, 2007 12:53 am

Setting up Irrlicht with Eclipse and MinGW on Vista

Post by Nuki »

I just spent the better part of a day sorting this out (because visual c++ 6 is incompatible with vista). There is one post on this subject in these forums but the link is dead, and there's pretty much no help to be found out on the web. I'm assuming you're somewhat familiar with C++ development. So here is my howto:

1. Download and install MinGW to get C/C++ compilers (current version is MinGW-5.1.3.exe from http://sourceforge.net/projects/mingw/). I'm assuming you'll install to C:\MinGW, otherwise adjust paths accordingly.

2. Edit the Path variable in system environment variables and append "C:\MinGW\bin\;" and "C:\MinGW\libexec\gcc\mingw32\3.4.5\;". For the second one, make sure the last folder name (3.4.5) matches the folder name for the version of MinGW that you downloaded. That folder should contain the files cc1 and cc1plus. Adding the second path shouldn't be necessary, but is a workaround for a bug that occurs in Vista.

3. Download and extract Eclipse IDE for C/C++ Developers (http://www.eclipse.org/downloads/).

4. Download and extract Irrlicht (http://irrlicht.sourceforge.net/downloads.html). I'm assuming you extract to C:\irrlicht\irrlicht-1.4\. If not, modify paths as needed.

5. To create an irrlicht-ready project in eclipse:
- create a new C++ project and name it: File > New > C++ Project (to have it setup folders and a source file for you choose: Executable > Hello World C++ Project)
- go to: Project > Properties > C/C++ Build > Settings > GCC C++ Compiler > Directories
- add the irrlicht inlude path: C:\irrlicht\irrlicht-1.4\include
- go to: Project > Properties > C/C++ Build > Settings > MinGW C++ Linker > Libraries
- add "C:\irrlicht\irrlicht-1.4\lib\Win32-gcc" to the Library search paths
- add "Irrlicht" to the Libraries (this will point to the gcc library file "libIrrlicht.a")
- copy Irrlicht.dll from C:\irrlicht\irrlicht-1.4\bin\Win32-gcc\ to same dir as your project exe (e.g. ...\workspace\project\debug\)

6. Paste in some irrlicht sample code but comment out the #pragma comment(lib, "Irrlicht.lib") line. GCC doesn't like it for some reason and the irrlicht library is already set to be linked.

7. Select Project > Build Project.

8. Finally, select Run > Run.

This worked for me. Hopefully it'll get others going on eclipse without much trouble.
dbest
Posts: 10
Joined: Wed Jan 02, 2008 4:45 pm

Post by dbest »

Great stuff Nuki...

Our team were deciding on an IDE to work with and Eclipse was mentioned. Since I also wanted to work with Irrlicht, this post has helped me.
jokoon
Posts: 17
Joined: Sun Aug 30, 2009 9:17 am

Post by jokoon »

2. Edit the Path variable in system environment variables and append "C:\MinGW\bin\;" and "C:\MinGW\libexec\gcc\mingw32\3.4.5\;". For the second one, make sure the last folder name (3.4.5) matches the folder name for the version of MinGW that you downloaded. That folder should contain the files cc1 and cc1plus. Adding the second path shouldn't be necessary, but is a workaround for a bug that occurs in Vista.
What system environment variable are you talking about ? the Windows ones ? or the eclipse ones ? where do I edit them ?

[EDIT]
me is stupid
just found it
sorry !
jokoon
Posts: 17
Joined: Sun Aug 30, 2009 9:17 am

Post by jokoon »

Problem:

Can't find
- go to: Project > Properties > C/C++ Build > Settings > GCC C++ Compiler > Directories
Maybe I have a wrong eclispe, but I just downloaded it (the C++ one).
jokoon
Posts: 17
Joined: Sun Aug 30, 2009 9:17 am

Post by jokoon »

http://gamedevfan.blogspot.com/2009/10/ ... intro.html

This one does not tell to add the env paths, so are there necessary ?

By the way, Iwas having difficulties with Xcode under OSX, but how about using eclipse under OSX ?
Does it make some X11 application as I heard on the irc channel ?
jeetee
Posts: 15
Joined: Tue Oct 13, 2009 3:09 pm
Contact:

Post by jeetee »

jokoon wrote:This one does not tell to add the env paths, so are there necessary ?
Yes, they are. However, if you use the MinGW installer package for windows, those are set by the installer.

Can't help you with the OSX-question though.
jokoon
Posts: 17
Joined: Sun Aug 30, 2009 9:17 am

Post by jokoon »

Finally, I made it work !
the only thing left to do were actually to move the .dll next to the .exe...
That is specified anywhere...
Epoch of Entropy
Posts: 1
Joined: Sat Nov 07, 2009 6:25 am

Post by Epoch of Entropy »

Thank you very much for writing this up.

For those looking at this thread: The details are important, and every step here is the absolute bare minimum. I got hung up on simply not copying the .a file correctly.
Post Reply