bongocat-osu icon indicating copy to clipboard operation
bongocat-osu copied to clipboard

System cannot find the file specified

Open ChristopherBuilderman opened this issue 4 years ago • 13 comments

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

Problem

I just hope that I haven't missed anything incredibly obvious.

ChristopherBuilderman avatar Jul 13 '20 23:07 ChristopherBuilderman

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.

kuroni avatar Jul 14 '20 00:07 kuroni

I'm not sure what you mean by "that command".

ChristopherBuilderman avatar Jul 15 '20 17:07 ChristopherBuilderman

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

kuroni avatar Jul 15 '20 17:07 kuroni

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

ChristopherBuilderman avatar Jul 15 '20 17:07 ChristopherBuilderman

That's interesting, I haven't seen this before :/ Can you tell me which g++ version are you using?

kuroni avatar Jul 18 '20 18:07 kuroni

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.

ChristopherBuilderman avatar Jul 18 '20 20:07 ChristopherBuilderman

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.

ChristopherBuilderman avatar Jul 21 '20 00:07 ChristopherBuilderman

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.

kuroni avatar Aug 12 '20 02:08 kuroni

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.

ChristopherBuilderman avatar Aug 12 '20 04:08 ChristopherBuilderman

Oh man, seems like -p doesn't work on Windows, should have tested this :/ Can you just delete all -p in your Makefile then?

kuroni avatar Aug 12 '20 04:08 kuroni

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.

ChristopherBuilderman avatar Aug 12 '20 04:08 ChristopherBuilderman

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.

kuroni avatar Aug 12 '20 05:08 kuroni

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.

cnkeats avatar Aug 06 '22 02:08 cnkeats