bongocat-osu
bongocat-osu copied to clipboard
Problems with running Makefile in Windows
Hi Kuroni,
I am having trouble getting this to properly make on Windows 10. I am pretty new to C++ so bear with me here...
I am on the Master branch and have copied the Makefile.windows
and renamed it just Makefile
. I then opened Makefile
in Notepad and edited the lines specifying SFML directory:
`
INCFLAGS := -I"C:\Users\Wuri\Downloads\SFML-2.5.1-windows-vc15-64-bit (1)\SFML-2.5.1/include" -Iinclude
LIBFLAGS := -L"C:\Users\Wuri\Downloads\SFML-2.5.1-windows-vc15-64-bit (1)\SFML-2.5.1/lib" ` I have also tried the 32 bit version, and tried all forward slashes or all back slashes to no differences.
I installed MinGW for my Windows Command Prompt to be able to make:
But it seems to error out as shown above and creates the following two directories in the project folder obj
and -p
:
I saw that another user had some similar issue using the nmake -f Makefile
command but resolved it when he had the above two lines with double quotes, which I have. So I decided to install Visual Studio. In the Developer CMD Prompt for VS 2019, I ran
At this point I am very not sure what else I need to change or if maybe I am not making properly? If you could offer any insight, that would be amazing! Thank you!
Here is the Makefile
if it helps, it should only have the two lines above different from the source.
Hi Wuri,
could you try to rename all folders to your sfml directory to only include a-z?
As in C:\Users\Wuri\Downloads\SFML\SFML
.
Spaces and some special characters are often problematic on windows and linux when they are in file or folder names.
You can also put the sfml folder in the same folder as bongocat-osu but instead of writing the full path C:\Users\Wuri\Documents\Github\bongocat-osu\SFML
you just write SFML
into the makefile.
I don't know the specific syntax for your make but you might want to try to look for a command line flag that always makes all targets. For my make that would be make -B
or make --always-make
. You can check by using make --help
, make -h
or make /?
If nothing works, you might want to try it again with a debug flag and attach the output as a file here. For my make that is make -d
. You also might want to write it to a text file immediately with make --your-debug-flag-here > output.txt
.
The Makefile.windows
for some reason uses the linux syntax where -p
signifies that mkdir
should create sub directories if necessary. This is done by default on windows mkdir
. Since windows mkdir
does not have any command options it thinks you want to create the directory -p
, wich it does. You should be able to remove the -p
.
When you share blocks of code, text or similar in the future you might want to think about sharing it within a codeblock as it makes working with the text easier. You can find out more about codeblocks here.
Hi,
Can you try replacing the last lines in the Makefile with these lines?
create:
mkdir $(OBJDIR) && exit 0
mkdir bin && exit 0
test:
bin/bongo.exe
clean:
del $(OBJ) && exit 0
del ico/ico.res && exit 0
The reason for your errors is because I tried to use Linux commands (i.e. mkdir) in the context of Linux, and it is not the same on Windows.