0

I've been trying to compile Ogre for weeks now, alternately trying to use the precompiled version (which was apparently incompatible with the same compiler it was built with), and now I've figured enough was enough. I ran CMake 2.8.11 on the Ogre 1.8.1 source to generate the Code::Blocks 12.11 project. Pressing the "compile" button in C::B gives me the following:

Build log:

-------------- Build: all in OGRE (compiler: GNU GCC Compiler)---------------

Running command: C:\MinGW\bin\mingw32-make.exe -f "C:/Users/Conscious Code/Desktop/ogre_src_v1-8-1/Makefile"  VERBOSE=1 all
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -H"C:\Users\Conscious Code\Desktop\ogre_src_v1-8-1" -B"C:\Users\Conscious Code\Desktop\ogre_src_v1-8-1" --check-build-system CMakeFiles\Makefile.cmake 0
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_progress_start "C:\Users\Conscious Code\Desktop\ogre_src_v1-8-1\CMakeFiles" "C:\Users\Conscious Code\Desktop\ogre_src_v1-8-1\CMakeFiles\progress.marks"
C:/MinGW/bin/mingw32-make -f CMakeFiles\Makefile2 all
mingw32-make[1]: Entering directory `C:/Users/Conscious Code/Desktop/ogre_src_v1-8-1'
C:/MinGW/bin/mingw32-make -f OgreMain\CMakeFiles\OgreMain.dir\build.make OgreMain/CMakeFiles/OgreMain.dir/depend
mingw32-make[2]: Entering directory `C:/Users/Conscious Code/Desktop/ogre_src_v1-8-1'
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_progress_report "C:\Users\Conscious Code\Desktop\ogre_src_v1-8-1\CMakeFiles" 
[  0%] 
Generating OgreWin32Resources.rc.obj
cd /d OgreMain && "C:\Program Files (x86)\CodeBlocks\MinGW\bin\windres.exe" "-IC:/Users/Conscious Code/Desktop/ogre_src_v1-8-1/OgreMain/src/WIN32" "-iC:/Users/Conscious Code/Desktop/ogre_src_v1-8-1/OgreMain/src/WIN32/OgreWin32Resources.rc" "-oC:/Users/Conscious Code/Desktop/ogre_src_v1-8-1/OgreMain/OgreWin32Resources.rc.obj"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files (x86)\CodeBlocks\MinGW\bin\windres.exe: preprocessing failed.
mingw32-make[2]: *** [OgreMain/OgreWin32Resources.rc.obj] Error 1
mingw32-make[1]: *** [OgreMain/CMakeFiles/OgreMain.dir/all] Error 2
mingw32-make: *** [all] Error 2
mingw32-make[2]: Leaving directory `C:/Users/Conscious Code/Desktop/ogre_src_v1-8-1'
mingw32-make[1]: Leaving directory `C:/Users/Conscious Code/Desktop/ogre_src_v1-8-1'
Process terminated with status 2 (0 minutes, 1 seconds)
1 errors, 0 warnings (0 minutes, 1 seconds)

Build messages:

=== OGRE, all ===
preprocessing failed.
=== Build finished: 1 errors, 0 warnings (0 minutes, 1 seconds) ===

From the error, it seems like some kind of issue with windres when it's generating OgreWin32Resource.rc.obj. What can I do to fix this?

  • Make sure you put quotes around the pathnames otherwise the spaces will be interpreted as separators between command line options. – Captain Obvlious May 31 '13 at 17:25
  • 3
    Some part of your toolchain is obviously incompatible with spaces in path (or the path is not escaped properly), because an error about "C:\Program" indicates it's confused by the space in "C:\Program Files..." – Angew is no longer proud of SO May 31 '13 at 17:25
  • I figured out this specific issue, and went on to be snagged by other, near impossible issues (about which which I won't be posting more questions). I'll post all the details when SO lets me. – Conscious Code May 31 '13 at 21:56

1 Answers1

0

Turns out it was a combination issue of spaces in the project path (which I had tried to fix earlier, getting the error anyway) and a improperly set CXX_MAKE_COMPILER that led to the "Program Files (x86)" folder (which was wrong anyway, I had a newer compiler in C:\MinGW). Fixing that, compilation went a little longer and then snagged on an issue of dependency architectures.

After realizing FreeImage required Visual Studio to compile, I threw in the towel and switched to Irrlicht. Compiling a library has never been more simple than with Irrlicht...

tl;dr: Irrlicht is just plain better for ease of compilation. Ogre will try its hardest to murder you.