Hello!
I'm going to post a tutorial here for both compiling Irrlicht on GNU/Linux, and utilizing it inside of an Eclipse project.
SOURCE COMPILATION:
First, grab the Irrlicht-1.8.4 source from here:
http://downloads.sourceforge.net/irrlic ... -1.8.4.zip
You can unzip this file anywhere within the GNU/Linux filesystem. Keep in mind that protected directories will require you to perform any additional commands as a super-user ("sudo").
You can "make" Irrlicht by changing directories to the "source/Irrlicht" directory, and with any number of jobs you think your processor can handle. For example "make -j4", will spawn four threads to assist with building the software. How many are used is up to your discretion.
After making, you can find the Linux library file at the "lib/Linux" directory.
USING IRRLICHT WITHIN THE ECLIPSE IDE
In order to get Irrlicht to play along with Eclipse, you need to make sure that the newly built Irrlicht library is referenced by your Eclipse project, as well as several default X11 libraries.
Inside of your project's settings (right-click upon your project and select "Properties"), go to the "C/C++ Build" tab and open it. Click upon the "Settings" option, and you'll be presented with the Compiler and Linker options for your project.
Open the "Cross G++ Linker" tab, and select the "Libraries" option. There are several you're going to have to enter in manually.
Within the "Libraries" pane on the right, enter in the following libraries, in any order:
Irrlicht
GL
X11
Xxf86vm
Beneath the Libraries pane should be the "Library search path" pane. Depending on the order you entered in the libraries, here is what their relative paths should be:
/PATH_TO_IRRLICHT/irrlicht-1.8.4/lib/Linux
/usr/lib
/usr/lib/x86_64-linux-gnu
Notice that there are only three reference paths, yet four library references. The compiler will know that both "X11" and "Xxf86vm" are to be found inside of the "x86_64-linux-gnu" directory.
Next, you'll need to include all of Irrlicht's headers in order to start coding with it!
Open up the "Cross G++ Compiler" tab and select the "Includes" option. Within here, set the "Include paths" for Irrlicht as:
/PATH_TO_IRRLICHT/irrlicht-1.8.4/include
That should clear up a bunch of errors if you've already begun coding prior to setting up your project.
If everything is linked up properly, your project should now compile without any issues.
This tutorial was written utilizing Irrlicht 1.8.4 and openSUSE Tumbleweed. Feel free to write any comments if you think I've missed something.
Cheers!
EDIT: Updated for version 1.8.4
Using Irrlicht with Eclipse on GNU/Linux
-
- Posts: 105
- Joined: Mon Jun 02, 2014 2:32 am
- Location: Washington, D.C.
- Contact:
Using Irrlicht with Eclipse on GNU/Linux
My blog: http://fsgdp.wordpress.com "The Free Software Game Development Pipeline"