Cannot Build Ogre 1.12 with CMake

Problems building or running the engine, queries about how to use features etc.
Post Reply
Posts: 1
Joined: Sat Jun 15, 2019 7:35 pm

Cannot Build Ogre 1.12 with CMake

Post by CasualYouTuber31 »

Ogre Version: 1.12 (current stable release)
Operating System: Windows 10, using the MinGW toolchain and Code::Blocks

Hi all, I'm attempting to build the latest stable release of OGRE1 using the help of the guide with little to no avail. Each time I attempt to configure OGRE in CMake it reports with "Error in configuration process, project files may be invalid" and I cannot proceed to generate the makefiles necessary because I get the same error.

Here is my error log:

Code: Select all

Determining if the include file pthread.h exists failed with the following output:
Change Dir: C:/Users/USERNAME/Documents/C++/ogre-1.12.0-build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/MinGW/bin/mingw32-make.exe cmTC_899cf/fast 
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_899cf.dir\build.make CMakeFiles/cmTC_899cf.dir/build

mingw32-make.exe[1]: Entering directory 'C:/Users/USERNAME/Documents/C++/ogre-1.12.0-build/CMakeFiles/CMakeTmp'

Building C object CMakeFiles/cmTC_899cf.dir/CheckIncludeFile.c.obj

C:\MinGW\bin\gcc.exe    -o CMakeFiles\cmTC_899cf.dir\CheckIncludeFile.c.obj   -c C:\Users\USERNAME\Documents\C++\ogre-1.12.0-build\CMakeFiles\CMakeTmp\CheckIncludeFile.c

C:\Users\USERNAME\Documents\C++\ogre-1.12.0-build\CMakeFiles\CMakeTmp\CheckIncludeFile.c:1:21: fatal error: pthread.h: No such file or directory

 #include <pthread.h>


compilation terminated.

CMakeFiles\cmTC_899cf.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_899cf.dir/CheckIncludeFile.c.obj' failed

mingw32-make.exe[1]: *** [CMakeFiles/cmTC_899cf.dir/CheckIncludeFile.c.obj] Error 1

mingw32-make.exe[1]: Leaving directory 'C:/Users/USERNAME/Documents/C++/ogre-1.12.0-build/CMakeFiles/CMakeTmp'

Makefile:120: recipe for target 'cmTC_899cf/fast' failed

mingw32-make.exe: *** [cmTC_899cf/fast] Error 2
From this, I found out that I did not have the pthread.h header installed. But after doing a little searching around I figured out that pthread.h is for Unix/Linux based systems? If this is the case then why does CMake require this file if I'm building on Windows? I even attempted to find a copy of the header file online, create a new pthread.h file in the include directory in my MinGW installation, and paste the code in this file, but the same errors popped up.

I'm not really sure how to proceed, I was hoping that maybe someone has encountered this error before and knows how to fix the problem, but I can't seem to find anything that helps in the forums or elsewhere online. I'd like to be able to build OGRE so that I can give it a try to see if it's suitable for my needs; it looks pretty good but I can't build it :( .

Thanks for your time.

OGRE Team Member
OGRE Team Member
Posts: 1070
Joined: Sun Mar 30, 2014 2:51 pm
x 366

Re: Cannot Build Ogre 1.12 with CMake

Post by paroj »

mingw32 is not supported. Please use

Post Reply