MinGW Troubleshooting Q&A
-
MinGW Troubleshooting Q&A
-
- Q: My MSYS window is black / can't be resized to fullscreen
- Q: When I use "cm", I get "sh: cm: command not found"
- Q: When I use "cm", I get a different error
- Q: "cmake": command not found
- Q: "gcc": command not found
- Q: "g++": command not found
- Q: CMake complains about a missing dependency directory
- Q: CMake complains about missing boost libraries
- Q: CMake complains about a missing data directory
- Q: I get an error while compiling / linking Orxonox
- Q: When I start Orxonox, I get a popup window saying *.dll could not …
- Q: When I start Orxonox, I get a black screen and a warning in the console
- Q: When I run Orxonox and start a level, it crashes
- Q: I can't hear any sound in Orxonox
-
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 "cm", I get "sh: cm: command not found"
$ cm sh: cm: command not found
A: If you get this error, you have to define the "cm" alias as explained here: WindowsMinGW/current.
Q: When I use "cm", I get a different error
There are multiple errors with multiple reasons. Sometimes this can be solved by closing (all instances of) MSYS and/or rebooting Windows.
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 and versions may differ, but you shouldn't get any errors. If one of the three tools can't be found, refer to the according question ("xxx": command not found).
If all three tools seem to work, but you still get an error using "cm", refer to the questions below ("CMake complains about xxx").
Q: "cmake": command not found
$ cmake --version sh: cmake: command not found
A: CMake is not installed properly or it is not added to the environment variable PATH. Please refer to the guide for an explanation.
Q: "gcc": command not found
$ gcc --version sh: gcc: command not found
A: 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).
Q: "g++": command not found
$ g++ --version sh: g++: command not found
A: 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.
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: CMake complains about missing boost libraries
A: You probably get an error like this:
$ cm [...] -- *** Build type is Debug *** CMake Error at [...]/FindBoost.cmake:xxxx (message): Unable to find the requested Boost libraries. [...] The following Boost libraries could not be found: boost_thread boost_filesystem boost_system boost_date_time [...]
In this case the boost libraries were probably built for a different version of MinGW and thus have a different name (e.g. boost_thread-mgw45-mt-1_46_1 instead of boost_thread-mgw47-mt-1_46_1). Enable debugging of the Find-Boost-Script and look for the expected library name:
$ cm -DBoost_DEBUG=true [...] -- [ [...]/FindBoost.cmake:xxxx ] Searching for THREAD_LIBRARY_RELEASE: boost_thread-mgw47-mt-1_46_1;[...] [...]
Go to the dependencies directory and rename the boost libraries accordingly (or build new dependencies using the correct version of MinGW).
Q: CMake complains about a missing data directory
A: You probably get an error like this:
$ cm [...] -- Warning: External data directory not found. If you want to compile while downloading the data files, you will have to recompile about four files afterwards and relink everything. -- You can specify your own folder with the EXTERNAL_DATA_DIRECTORY variable. Default location for the path is orxonox_root/data_extern [...]
In this case you didn't check out the external data repository or you didn't name it data_extern or you placed it in the wrong place. See the section "SVN" in the guide for more information about the data repository.
Q: I get an error while compiling / linking Orxonox
A: Please ask in the forum.
Q: When I start Orxonox, I get a popup window saying *.dll could not be found
A: You can't start orxonox.exe directly. Please use run.bat instead, because this adds the dependency directory to the PATH variable. If you still get this message, ask in the forum.
Q: When I start Orxonox, I get a black screen and a warning in the console
A: You're probably missing the data_extern directory. See the question Q: CMake complains about a missing data directory for more information.
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.
Q: I can't hear any sound in Orxonox
You probably have to install OpenAL. See the section about OpenAL in the guide.