<div dir="ltr"><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">I get the following error when I use a toolchain file to cross-compile with mingw32:</font></div><div><font class="Apple-style-span" face="'courier new', monospace">$ cmake -DCMAKE_TOOLCHAIN_FILE=~/Documentos/mingw32.cmake -DCMAKE_INSTALL_PREFIX=/usr/i486-mingw32 .</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">-- The C compiler identification is GNU</font></div><div><font class="Apple-style-span" face="'courier new', monospace">-- The CXX compiler identification is GNU</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">CMake Error: your RC compiler: "CMAKE_RC_COMPILER-NOTFOUND" was not found. Please set CMAKE_RC_COMPILER to a valid compiler path or name.</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">-- Check for working C compiler: /usr/bin/i486-mingw32-gcc</font></div><div><font class="Apple-style-span" face="'courier new', monospace">CMake Error at /usr/share/cmake-2.8/Modules/CMakeRCInformation.cmake:22 (GET_FILENAME_COMPONENT):</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> get_filename_component called with incorrect number of arguments</font></div><div><font class="Apple-style-span" face="'courier new', monospace">Call Stack (most recent call first):</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> /usr/share/cmake-2.8/Modules/Platform/Windows-GNU.cmake:59 (enable_language)</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> /usr/share/cmake-2.8/Modules/Platform/Windows-GNU-C.cmake:1 (include)</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> /usr/share/cmake-2.8/Modules/CMakeCInformation.cmake:56 (INCLUDE)</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> CMakeLists.txt:2 (PROJECT)</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace">CMake Error: CMAKE_RC_COMPILER not set, after EnableLanguage</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">CMake Error: Internal CMake error, TryCompile configure of cmake failed</font></div><div><font class="Apple-style-span" face="'courier new', monospace">-- Check for working C compiler: /usr/bin/i486-mingw32-gcc -- broken</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> The C compiler "/usr/bin/i486-mingw32-gcc" is not able to compile a simple</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> test program.</font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace"> It fails with the following output:</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace"> </font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br>
</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> </font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace"> CMake will not be able to correctly generate this project.</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">Call Stack (most recent call first):</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> CMakeLists.txt:3 (PROJECT)</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace">-- Configuring incomplete, errors occurred!</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">My toolchain file is:</font></div><div><div><font class="Apple-style-span" face="'courier new', monospace">set(CMAKE_SYSTEM_NAME Windows)</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">set(CMAKE_C_COMPILER i486-mingw32-gcc)</font></div><div><font class="Apple-style-span" face="'courier new', monospace">set(CMAKE_CXX_COMPILER i486-mingw32-g++)</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">set(CMAKE_FIND_ROOT_PATH /usr/i486-mingw32)</font></div><div><font class="Apple-style-span" face="'courier new', monospace">set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)</font></div><div><font class="Apple-style-span" face="'courier new', monospace">set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)</font></div>
<div style="font-family: arial, helvetica, sans-serif; "><br></div></div><div><br></div></div>