solislemuslab/minaa

makefile error

Closed this issue · 1 comments

Hi!

I was trying to install minaa on windows 10.
I tried with Ubuntu LTS (seemed less complicated than figuring out mingw) and got this error:

~/minaa$ make
g++ -O3 -g -c -Wall -Wextra -ansi -pedantic -std=c++20 -Iinclude -o obj/minaa.o src/minaa.cpp
make: g++: No such file or directory
make: *** [Makefile:26: obj/minaa.o] Error 127

Sometimes linux on Windows has a hard time with paths, so I tried with mingw, I got this error:

~\minaa>make
g++ -O3 -g -c -Wall -Wextra -ansi -pedantic -std=c++20 -Iinclude -o obj/minaa.o src/minaa.cpp
process_begin: CreateProcess(NULL, g++ -O3 -g -c -Wall -Wextra -ansi -pedantic -std=c++20 -Iinclude -o obj/minaa.o src/minaa.cpp, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [Makefile:26: obj/minaa.o] Error 2

Turns out the file not found was g++...

So apparently, having or installing 'make' on Ubuntu doesn't mean you also have g++ already. I installed it with sudo apt install g++.
For the windows install, the link from the guide in the readme wasn't working for me, so I got mingw-get from https://sourceforge.net/projects/mingw/. Also, since I got minwg with RTools, I had to make sure, make.exe and g++.exe got install in the same mingw folder else, they doesn't find each other.
After that, it work with both mingw and Ubuntu LTS.

In the compilation section it says 'any method for compiling C++ should suffice', but maybe, I'd add a note about needing g++ specifically since that's what your makefile uses. I would also add it to the unix method.

Thank you for the detailed description @salix-d! the README has been updated to reflect the need for specifically g++, and with a link to the MinGW download from SourceForge. Let me know if you have any further suggestions.