Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 4 (modified by landauf, 14 years ago) (diff)

MinGW Troubleshooting Q&A

Q: My MSYS window is black / can't be resized to fullscreen

A: You're using the wrong shortcut to open MSYS. See the note at the bottom of the "MSYS" section in the installation guide.

Q: When I use the "cm" (or "cmake") command, I get an error

There are multiple errors with multiple reasons. Sometimes this can be solved by closing (all instances of) MSYS and/or rebooting Windows. If this doesn't help, compare your error message to the examples below:

A1: "cm" alias is not defined:

sh: cm: command not found

If your error looks like this, you have to define the "cm" alias as explained here: WindowsMinGW/current.

A2: CMake is not installed / not in PATH

sh: cmake: command not found

If you get this error, CMake is not installed properly or it is not added to the environment variable PATH. Please refer to the guide for an explanation.

A3: MinGW not installed properly / MSYS not correctly configured

$ cm
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /mingw/bin/gcc.exe
-- Check for working C compiler: /mingw/bin/gcc.exe -- broken
CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler "/mingw/bin/gcc.exe" is not able to compile a simple test
  program.

...

If CMake prints an error like this (and about 30 more lines), the GCC compiler was not found. Make sure you installed MinGW and MSYS properly by following the guide. You can also open the file c:\<msys-install-path>\etc\fstab with a text-editor (WordPad, Notepad) and check if the path to MinGW is configured correctly (default is c:/mingw /mingw).

A4: g++ is not installed

$ cm
-- The C compiler identification is GNU
-- The CXX compiler identification is unknown
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: g++.exe
CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/Platform/Windows-g++.cmake:1 (INCLUDE):
  include could not find load file:

...

If CMake prints an error like this (and about 20 more lines), you probably missed to install g++ with MinGW. Please refer to the installation guide and ensure you selected "C++ Compiler" in the installation menu of MinGW.

Note

Note that if you're using a sane installation of MinGW and the other tools (as explained in the guide), you should be able to use cmake, gcc, and g++. You can check this in the MSYS console:

$ cmake --version
cmake version 2.8.2

$ gcc --version
gcc.exe (GCC) 4.5.0

$ g++ --version
g++.exe (GCC) 4.5.0

The actual output may differ, but you shouldn't get any errors.

Q: CMake complains about a missing dependency directory

A: You probably get an error like this:

$ cm
[...]
-- *** Build type is Debug ***
-- Warning: Could not find dependency directory.Disable LIBRARY_USE_PACKAGE if you have none intalled.
[...]

In this case you didn't put the dependency package into the right directory. Please refer to the guide for more information about the dependency package and where to place it. Also make sure that you don't use two nested dependency directories (i.e. /home/username/dependencies/dependencies) but just one.

Q: When I run Orxonox and start a level, it crashes.

A: Check if you get an error similar to this:

terminate called after throwing an instance of 'Ogre::ItemIdentityException'

what():  OGRE EXCEPTION(5:ItemIdentityException): Unable to derive resource gr
oup for templates/includes/weaponsettings3.oxi automatically since the resource
was not found. in ResourceGroupManager::findGroupContainingResource at ../../Ogr
eMain/src/OgreResourceGroupManager.cpp (line 1782)

In this case you probably compiled Orxonox with a different version of MinGW than the dependencies are. Note that there are two different methods of exception handling: SJLJ (setjmp/longjmp) and DW2 (Dwarf-2). The dependencies are compiled using DW2. You either have to recompile the C++ dependencies (boost, cegui, ogre) or install the correct version of MinGW. You can check which method your installation supports if you search for c:\mingw\bin\libgcc_s_xxx-1.dll - xxx is either dw2 or sjlj.