bongocat-osu
bongocat-osu copied to clipboard
System cannot find the file specified
As an alternative to my other issue I started trying to compile an exe and ran into some problems, some of which I fixed by looking at some other people's screenshots or issues. However when I run make I still run into the problem that it says it cannot find a file. I will include the exact error code as well as screenshots of all my files and things.
g++ -c -o obj/ctb.o src/ctb.cpp -DSFML_STATIC -I SFML-2.5.1/include -Iinclude -L SFML-2.5.1/lib -std=c++17 -s -O2 -mwindows -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lopengl32 -lfreetype -lwinmm -lgdi32 -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic process_begin: CreateProcess(NULL, g++ -c -o obj/ctb.o src/ctb.cpp -DSFML_STATIC -I SFML-2.5.1/include -Iinclude -L SFML-2.5.1/lib -std=c++17 -s -O2 -mwindows -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lopengl32 -lfreetype -lwinmm -lgdi32 -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic, ...) failed. make (e=2): The system cannot find the file specified. make: *** [Makefile:19: obj/ctb.o] Error 2
I just hope that I haven't missed anything incredibly obvious.
The Makefile looks correct to me, so I'm not sure what file is missing here. It can be g++
, so you might want to try running that command manually.
I'm not sure what you mean by "that command".
This one g++ -c -o obj/ctb.o src/ctb.cpp -DSFML_STATIC -I SFML-2.5.1/include -Iinclude -L SFML-2.5.1/lib -std=c++17 -s -O2 -mwindows -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lopengl32 -lfreetype -lwinmm -lgdi32 -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic
When I do that it says that there is a missing argument in the parameter list.
At line:1 char:249
- ... reetype -lwinmm -lgdi32 -static-libgcc -static-libstdc++ -Wl,-Bstatic ...
-
~
Missing argument in parameter list. At line:1 char:281
- ... libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynami ...
-
~
Missing argument in parameter list. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : MissingArgument
That's interesting, I haven't seen this before :/ Can you tell me which g++ version are you using?
Honestly I don't know. I am not experienced at all with packaging this way. The alpha is really the only thing I wanted so if that gets added to a version I don't need to be able to make my own.
Okay after trying to run Linux in a Virtual Box for about 5 hours because installing g++ and using it only Linux seemed easier I am coming back to this. I looked over the instructions for installing g++ again and it tells you how to find the version so I am running g++ 9.2.0, gdb 7.6.1, and make 4.3. I also can definitely confirm that I have them installed now.
Okay, this might be a mistake of mine. You need to create another directory called obj
to make it work. You can pull from the latest release if you want to give it a try, I updated the Makefile demo.
It still doesn't work on the 1.5 source code. It says that a subdirectory "-p" already exists and seems to be messing up on line 28:
mkdir -p bin
Tried downloading a fresh copy and also deleting -p, bin, and obj and trying again and neither worked.
Oh man, seems like -p doesn't work on Windows, should have tested this :/ Can you just delete all -p
in your Makefile then?
When I do that I get the same error I got at the beginning. I don't think its the obj directory as it does create that successfully and when I try to run it again in the same folder it fails because obj already exists.
Are you sure that the Makefile looks correct? I'm thinking maybe I did something wrong with the name of the SFML file.
Oh ...
You should do -ISFML2.5.1
instead of -I SFML2.5.1
. Same with -L
.
Wow that is so incredibly obvious that I now feel dumb finding it out
Edit: Actually that doesn't change anything at all.
I know that I am several years late on this, but I am commenting in hopes of helping out anyone else with this issue.
This error is caused by not having MinGW installed.