1. Extracted the downloaded zip file for Irrilicht 1.8.4 and put it in the /Home directory.
2. Before following the instructions in readme.txt file in /home/irrlicht-1.8.4/bin/linux, I modified the Makefile in /home/irrlicht-1.8.4/source/Irrilicht by appending '-fPIC' to the following (3 lines were effected):
Code: Select all
###############
#Compiler flags
CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng -fPIC
CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1
CXXFLAGS += -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing
ifndef NDEBUG
CXXFLAGS += -g -D_DEBUG
else
CXXFLAGS += -fexpensive-optimizations -O3 -fPIC
endif
ifdef PROFILE
CXXFLAGS += -pg
endif
CFLAGS := -O3 -fexpensive-optimizations -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES -fPIC
3. I then called the terminal 'make' command from /home/irrlicht-1.8.4/source/Irrilicht. This created the library file /home/irrlicht-1.8.4/lib/Linux/libIrrlicht.a. [NB. how do I create a libIrrlicht.so instead of a libIrrlicht.a file? I have been told this is possibly a better solution]
4. However, when I call the terminal 'make' command to build an Irrilicht example (in /home/irrlicht-1.8.4/examples), I get the following error:
Code: Select all
greenbeast@Destiny:~/irrlicht-1.8.4/examples/01.HelloWorld$ make
Makefile:47: Building...
g++ -I../../include -I/usr/X11R6/include -O3 -ffast-math main.cpp -o ../../bin/Linux/01.HelloWorld -L../../lib/Linux -lIrrlicht -L/usr/X11R6/lib -lGL -lXxf86vm -lXext -lX11 -lXcursor
/usr/bin/ld: cannot find -lXcursor
collect2: error: ld returned 1 exit status
Makefile:47: recipe for target 'all_linux' failed
make: *** [all_linux] Error 1
Code: Select all
greenbeast@Destiny:~/Documents/Development$ make
[ 50%] Building CXX object CMakeFiles/crank.dir/SliderCrankMechanism.cpp.o
In file included from /usr/local/include/chrono_irrlicht/ChIrrApp.h:17:0,
from /home/greenbeast/Documents/Development/SliderCrankMechanism.cpp:29:
/usr/local/include/chrono_irrlicht/ChIrrAppInterface.h:18:10: fatal error: irrlicht.h: No such file or directory
#include <irrlicht.h>
^~~~~~~~~~~~
compilation terminated.
CMakeFiles/crank.dir/build.make:62: recipe for target 'CMakeFiles/crank.dir/SliderCrankMechanism.cpp.o' failed
make[2]: *** [CMakeFiles/crank.dir/SliderCrankMechanism.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/crank.dir/all' failed
make[1]: *** [CMakeFiles/crank.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Many thanks