[Solved] cmake on windows gcc

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
bibiteinfo
Gremlin
Posts: 197
Joined: Wed Apr 12, 2006 2:48 pm
Location: Montreal, Canada

[Solved] cmake on windows gcc

Post by bibiteinfo »

I need to compile Ogre on a gcc compiler on Windows. I can't use VS Express for this project.

I had those errors when generating configuration
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
Missing variable is:
CMAKE_C_COMPILER
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage "
So I added CMAKE_C_COMPILER --> C:/Program Files/CodeBlocks/MinGW/bin
CMAKE_CXX_COMPILER --> C:/Program Files/CodeBlocks/MinGW/bin
CMAKE_CXX_COMPILER_ENV_VAR --> CXX
CMAKE_C_COMPILER_ENV_VAR --> CC

It solved those errors, but I still get :
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: Could not find cmake module file:C:/Users/Fred/Desktop/Ogre Src/Builds7/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Could not find cmake module file:C:/Users/Fred/Desktop/Ogre Src/Builds7/CMakeFiles/CMakeCXXCompiler.cmake
Configuring incomplete, errors occurred!
I installed gnuWin32.exe and tried to add the variable CMAKE_MAKE_PROGRAM to point to "C:\Program Files\GnuWin32\bin" and "C:\Program Files\GnuWin32\bin\make" and "C:\Program Files\GnuWin32\bin\make.exe", but when I click configure, CMAKE_MAKE_PROGRAM disappears and I get the same errors.

I don't know what to do now ... Help would be really appreciated.
Thanks
Last edited by bibiteinfo on Fri Jan 29, 2010 7:14 pm, edited 1 time in total.
Image
CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 58
Contact:

Re: cmake on windows gcc

Post by CABAListic »

You will probably need to add C:\Program Files\GnuWin32\bin to your path so that CMake can pick them up properly. Or if you want to do it manually, it's incorrect to set those variables to a path, they need to point to the actual programs.

Anyway, you should use one of the MinGW installers from http://www.tdragon.net/recentgcc/ and just let it set the PATH at the end. That should do the trick.
User avatar
bibiteinfo
Gremlin
Posts: 197
Joined: Wed Apr 12, 2006 2:48 pm
Location: Montreal, Canada

Re: cmake on windows gcc

Post by bibiteinfo »

It worked!!

Thanks so much!
Image
Post Reply