Skip to content

Build Irrlicht Engine On FreeBSD

Irrlicht Engine

Build Irrlicht Engine On FreeBSD

Build Irrlicht Engine on FreeBSD. Other systems should works too. If you only want a stable release, ports/pkg is OK.
FreeBSD# pkg install -y irrlicht
FreeBSD# cd /usr/ports/x11-toolkits/irrlicht
FreeBSD# make install clean
But, if you want to benefit the latest new features, you should build from the sources.

1. Get irrlicht source code

You can get irrlicht source code from with FreeBSD svnlite:
FreeBSD% svnlite co irrlicht

2. Build irrlicht

FreeBSD% cd irrlicht
FreeBSD% cd source/Irrlicht
FreeBSD% CPLUS_INCLUDE_PATH=/usr/local/include gmake
The building process will be finished after a while.
Now, make the directory trees.
FreeBSD% cd ~
FreeBSD% mkdir -p bin/local/irrlicht
FreeBSD% cd bin/local/irrlicht
FreeBSD% mkdir lib
FreeBSD% dir=`pwd`
FreeBSD% cd ~
FreeBSD% cp -rf irrlicht/include $dir/
FreeBSD% cp irrlicht/lib/Linux/libIrrlicht.a $dir/lib/
Now irrlicht has been installed to ${HOME}/bin/local/irrlicht

3. Run Irrlicht Examples

There are Many Irrlicht Examples in irrlicht sources.
Build 01.HelloWorld
FreeBSD% cd irrlicht/examples/01.HelloWorld
FreeBSD% ls
HelloWorld_vc10.vcxproj HelloWorld.cbp          Makefile
HelloWorld_vc11.vcxproj HelloWorld.vcproj       tutorial.html
HelloWorld_vc12.vcxproj HelloWorld.xcodeproj
HelloWorld_vc14.vcxproj main.cpp
FreeBSD% ipath=${HOME}/bin/local/irrlicht
FreeBSD% clang++ main.cpp -I/usr/local/include -I${ipath}/include \                  
> -L/usr/local/lib -L${ipath}/lib -lIrrlicht -lX11 -lGL -lXxf86vm \
> -o01.HelloWorld
After compiling, run 01.HelloWorld, you will see an animated fantasy girl appears in an opening window. The girl is a 3d model sydney.md2 .
FreeBSD% ./01.HelloWorld
That's all.

Further Reading:
Irrlicht Engine Tutorials:




No Trackbacks


Display comments as Linear | Threaded

No comments

Add Comment

E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.

Form options

Submitted comments will be subject to moderation before being displayed.