Compilation and installation of OGRE1.12 - Manjaro
install dependencies
If it is missing, freeimage
an error will be reported:
ogre-1.12.6/PlugIns/FreeImageCodec/src/OgreFreeImageCodec.cpp:31:10: fatal error: FreeImage.h: No such file or directory
31 | #include <FreeImage.h>
| ^~~~~~~~~~~~~
compilation terminated.
If it is missing, libxaw
an error will be reported:
ogre-1.12.6/Components/Bites/src/OgreGLXConfigDialog.cpp:49:10: fatal error: X11/Xaw/Command.h: No such file or directory
49 | #include <X11/Xaw/Command.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
sudo pacman -S freeimage
sudo pacman -S libxaw
Compile, compile and install ogre
Create a new build folder in the source code directory, enter and set cmake:
mkdir build
cd build
cmake-gui ..
It is recommended to use the GUI interface settings here.
Here I OGRE_BUILD_PLUGIN_CG
removed the tick, because I am using an AMD graphics card, and this item needs to be installed nvidia-cg-toolkit
. Then configure and generate Makefile.
In addition, my source code does not contain imgui, so I need to download it here , and unzip it to ogre-1.12.6/Components/Overlay/src/imgui/
, pay attention to keep the original in this folder imconfig.h
.
Finally compile:
make -j7
Install xorg-fonts-misc
and restart, otherwise an error will be reported when running the sample program saying Unable to load any usable ISO8859 font
:
sudo -S xorg-fonts-misc
Install OGRE:
sudo make install
Run the sample program
If you just followed the settings in cmake, the sample program is installed by default. Open the sample program below:
build/bin/SampleBrowser
operation result: