Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[BUG]: errors while trying to generate MinGW makefile with CMake on windows #31

Open
Labels
bugSomething isn't workingneeds triageThis issue needs a manteiner revision
@Blargian

Description

@Blargian

Describe you problem:

Windows users may need to use MinGW with CMake to compile the program. When generating a makefile for the sorting-visualizer using mingw32-make the following errors are thrown:

\sorting-visualizer\src\SortController.cpp: In member function 'void SortController::_startSort(int)':\sorting-visualizer\src\SortController.cpp:144:71: error: no matching function for call to 'std::thread::thread(void (SortController::*)(), SortController*)'  144 |         _animThread = std::thread(&SortController::checkSortAnim, this);      |                                                                       ^In file included from C:/mingw64/lib/gcc/x86_64-w64-mingw32/12.2.0/include/c++/thread:43,                 from \sorting-visualizer\src\SortController.h:10,                 from \sorting-visualizer\src\SortController.cpp:1:C:/mingw64/lib/gcc/x86_64-w64-mingw32/12.2.0/include/c++/bits/std_thread.h:156:5: note: candidate: 'std::thread::thread(std::thread&&)'  156 |     thread(thread&& __t) noexcept      |     ^~~~~~C:/mingw64/lib/gcc/x86_64-w64-mingw32/12.2.0/include/c++/bits/std_thread.h:156:5: note:   candidate expects 1 argument, 2 providedC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.2.0/include/c++/bits/std_thread.h:120:5: note: candidate: 'std::thread::thread()'  120 |     thread() noexcept = default;      |     ^~~~~~C:/mingw64/lib/gcc/x86_64-w64-mingw32/12.2.0/include/c++/bits/std_thread.h:120:5: note:   candidate expects 0 arguments, 2 provided\sorting-visualizer\src\SortController.cpp: In member function 'void SortController::startSort(int)':\sorting-visualizer\src\SortController.cpp:165:81: error: no matching function for call to 'std::thread::thread(void (SortController::*)(int), SortController*, int&)'  165 |         _sortingThread = std::thread(&SortController::_startSort, this, sortType);      |                                                                                 ^C:/mingw64/lib/gcc/x86_64-w64-mingw32/12.2.0/include/c++/bits/std_thread.h:156:5: note: candidate: 'std::thread::thread(std::thread&&)'  156 |     thread(thread&& __t) noexcept      |     ^~~~~~C:/mingw64/lib/gcc/x86_64-w64-mingw32/12.2.0/include/c++/bits/std_thread.h:156:5: note:   candidate expects 1 argument, 3 providedC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.2.0/include/c++/bits/std_thread.h:120:5: note: candidate: 'std::thread::thread()'  120 |     thread() noexcept = default;      |     ^~~~~~C:/mingw64/lib/gcc/x86_64-w64-mingw32/12.2.0/include/c++/bits/std_thread.h:120:5: note:   candidate expects 0 arguments, 3 providedmingw32-make[2]: *** [CMakeFiles\sorting-visualizer.dir\build.make:121: CMakeFiles/sorting-visualizer.dir/src/SortController.cpp.obj] Error 1mingw32-make[1]: *** [CMakeFiles\Makefile2:82: CMakeFiles/sorting-visualizer.dir/all] Error 2mingw32-make: *** [Makefile:90: all] Error 2

Steps to reproduce (optional):

  • clone the directory on windows usinggit clone https://github.com/alesbe/sorting-visualizer && cd sorting-visualizer
  • install CMake version 3.25.1
  • navigate to the root directory of the above cloned repository on local machine
  • Set up gcc and g++ compilers using (installation path may vary):

CMake -DCMAKE_C_COMPILER="C:/mingw64/bin/gcc.exe"
CMake DCMAKE_CXX_COMPILER="C:/mingw64/bin/g++.exe"

  • runCMake -G "MinGW Makefiles"
  • Build files get written to /sorting-visualizer
  • runmingw32-make
  • errors above occur at this point

Additional info (optional):

Running Windows 11
gcc.exe (x86_64-win32-sjlj-rev0, Built by MinGW-W64 project) 12.2.0
g++.exe (x86_64-win32-sjlj-rev0, Built by MinGW-W64 project) 12.2.0

OS

  • : Windows
  • : Mac OS
  • : Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds triageThis issue needs a manteiner revision

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp