Open Blargian opened 1 year ago
@alesbe i'm fairly new to development in C++ so quite possible I'm just making some newbie mistake somewhere. Thought it might be good to create this issue anyway for any other users who may run into issues trying to get sorting-visualizer to work on windows. I'll keep looking into it.
Thanks for reporting the bug!
When I was developing this, I was using Linux with CMake, I've never used CMake in Windows so I don't know what is causing the error...
Anyways, I'll look into it right now. There should be an easier way to compile the project in Windows, like the install.sh
for Linux.
Here is a guide from SFML to compile it using CMake. I will try to fix it and after that, I will make an installation script for Windows. I'll keep you updated!
Thanks for the link. I tried this morning following along with the tutorial. Was able to generate the makefile successfully but get the same errors when trying to build - it gets 66% of the way through. I suspect that maybe it has to do with mingw not having a version of GCC which supports threading or the c++11 standard by default.
I will try use a C++11 compiler for windows like MinGW-Builds rather than MinGW and see if that helps.
@alesbe I was able to get it working on windows so I think this reported bug isn't actually a bug, just a configuration issue on my side. Once I installed MinGW-Builds and used their included version of g++ compiler rather than the one included with MinGW I was able to build without errors.
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:
Steps to reproduce (optional):
git clone https://github.com/alesbe/sorting-visualizer && cd sorting-visualizer
CMake -DCMAKE_C_COMPILER="C:/mingw64/bin/gcc.exe"
CMake DCMAKE_CXX_COMPILER="C:/mingw64/bin/g++.exe"
CMake -G "MinGW Makefiles"
mingw32-make
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