Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wont build on Mac OSX? #2

Open
JDStraughan opened this issue Aug 17, 2021 · 2 comments
Open

Wont build on Mac OSX? #2

JDStraughan opened this issue Aug 17, 2021 · 2 comments

Comments

@JDStraughan
Copy link

Installed SDL2 via homebrew, same error before and after install using build.sh or make:

asteroid % bash build.sh
\e[93mAst3r0id Game - Coded By v3l0r3k\e[0m

[+] Install SDL2 libraries? (sudo required) [Y/N]: Y
Password:
sudo: apt-get: command not found
sudo: apt-get: command not found
sudo: apt-get: command not found
sudo: apt-get: command not found

[+] Attempting to compile game...
In file included from list.c:4:
./list.h:6:10: fatal error: 'SDL2/SDL.h' file not found
#include <SDL2/SDL.h>
^~~~~~~~~~~~
1 error generated.
main.c:21:10: fatal error: 'SDL2/SDL.h' file not found
#include <SDL2/SDL.h>
^~~~~~~~~~~~
1 error generated.
clang: error: no such file or directory: 'list.o'
clang: error: no such file or directory: 'main.o'
gcc main.c -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lm -Wall -o asteroid

Run as \e[93m./asteroid\e[0m
Enjoy it!

@JDStraughan
Copy link
Author

make
gcc -Wall -Wextra -Os -c -o list.o list.c
In file included from list.c:4:
./list.h:6:10: fatal error: 'SDL2/SDL.h' file not found
#include <SDL2/SDL.h>
^~~~~~~~~~~~
1 error generated.
make: *** [list.o] Error 1

@velorek1
Copy link
Owner

I see. Thank you for letting me know. The issue seems to be missing SDL2 headers/SDL2 development libraries or that the compiler can't find the path to where they are.

Unfortunately, I don't have MAC OS X to help you through it. This tutorial uses Xcode to set things up. I hope it helps: https://www.youtube.com/watch?v=uvxV1xlApm4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants