Closed KenniBlank closed 17 hours ago
I'll give it a try
I'm having some trouble with compilation. Everything is going well up until the linking phase at which is errors out and says Undefined reference to WinMain
. I'm still looking at it but I have no idea on how to fix this yet
Okay got a successful build for Windows:
I still got to figure out the install instructions since I've gone quite a lot back and forth to set this up
I'll submit a PR in a moment
PR #8
Add changes of the Makefile to make .exe and send a PR.
Additionally, can you make it OS specific. I.e: create and run .exe on WINDOWS create and run ./game on Linux/Mac
Thanks
@KenniBlank I've submitted a PR adding support for Windows at #10 I've also removed the part where the game is run after compilation from the Makefile. I think it is better to leave the Makefile for compilation and then the user can run the game if they want (in case they just need to check if it compiles or not)
As for MacOS support, I don't really have any way of testing if it works but I believe it shouldn't be too different from Linux
I have removed the .gitignore file because I want the user to get right into the game rather than compile. For now lets keep it this way.
i checked on a windows machine and the .exe doesn't work. Try to fix it. Thanks
@KenniBlank Could you add more info? Are you using MinGW? What are the steps you've done to set up the project? And ".exe doesn't work" means that it compiles but doesn't work or that it doesn't compile?
Lemme check real quick
the make file has a error! It is using gcc for both windows and linux, it should be using mingw32 or mingw64
Yes because MinGW lets you install gcc
through pacman
My bad, MSYS2 is the one that lets you install gcc
through pacman
. MinGW just provides the package
can you upload your version of game.exe
@KenniBlank https://www.mediafire.com/folder/46pi3lipfuwjn/ShooterGame2D (game compiled on my VM + libs) Let me know if you want me to add it to the project as a commit
Add it in.
Done #12
msys-2.0.dll was missing so I added it in. Also there seems to be the issue of double windows opening, (maybe compiler fault ) ( maybe code fault which I will check into) Thanks
At least it works right?
Yep.
I don't have a windows device to test on.
Create a method to create game.exe file with the given mainGame.c program. I want the program to be able to be run on WINDOWS too.