Compilation and installation of OGRE1.12 - Manjaro

Compilation and installation of OGRE1.12 - Manjaro

install dependencies

If it is missing, freeimagean 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, libxawan 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_CGremoved 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-miscand 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:
ogre1

Guess you like

Origin blog.csdn.net/willian113/article/details/106957065