Skip to content

Fixed build failures on mingw-w64.

Aleksey Chernov requested to merge virx/cmake:master into master

Starting with cmake-3.8.0 building on mingw-w64 failed. cmake-3.8.1 also affected.

./bootstrap --parallel=5  --prefix=/mingw --system-libs --no-system-jsoncpp --no-qt-gui

...

g++  -I/build/cmake-3.8.1/Bootstrap.cmk -I/build/cmake-3.8.1/Source   -I/build/cmake-3.8.1/Utilities  -c /build/cmake-3.8.1/Source/cmFileCommand.cxx -o cmFileCommand.o
D:/msys2_x64/build/cmake-3.8.1/Source/cmFileCommand.cxx: In function 'std::__cxx11::string fix_file_url_windows(const string&)':
D:/msys2_x64/build/cmake-3.8.1/Source/cmFileCommand.cxx:84:29: error: 'CP_ACP' was not declared in this scope
         WideCharToMultiByte(CP_ACP, 0, wurl.c_str(), -1, NULL, 0, NULL, NULL);
                             ^~~~~~
D:/msys2_x64/build/cmake-3.8.1/Source/cmFileCommand.cxx:84:9: error: 'WideCharToMultiByte' was not declared in this scope
         WideCharToMultiByte(CP_ACP, 0, wurl.c_str(), -1, NULL, 0, NULL, NULL);
         ^~~~~~~~~~~~~~~~~~~
g++  -I/build/cmake-3.8.1/Bootstrap.cmk -I/build/cmake-3.8.1/Source   -I/build/cmake-3.8.1/Utilities  -c /build/cmake-3.8.1/Source/cmFindLibraryCommand.cxx -o cmFindLibraryCommand.o
make: *** [Makefile:108: cmFileCommand.o] Ошибка 1
make: *** Ожидание завершения заданий…

Using:

  • gcc-7.1.0, gcc-6.3.0
  • mingw-w64-5.0.2

Fixes: #16879 (closed)
Topic-rename: mingw-w64-compile

Merge request reports