-
Notifications
You must be signed in to change notification settings - Fork 2
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
[MacOS 15.1] fatal error: 'SDL2/SDL.h' file not found #1
Comments
Seems like the compiler can't find the SDL header files. What you've specified in your PATH variable are (presumably) the locations of the library itself, not its headers. I also forgot to mention that you need to install SDL2_ttf. Basically, you need to find the location of your SDL2 header files and library objects and pass them to configure script. The instructions below should outline the process. Install DependenciesInstall SDL2 and SDL2_ttf from homebrew:
Locate header filesLocate your SDL2 header file location. By default, it should be in
You can also try searching for it in homebrew's
Create a symbolic linkCreate a symbolic link to SDL_ttf within the SDL directory. The header file for SDL2_ttf assumes that the SDL_ttf.h is in the same directory as the rest of the SDL library (which is not actually the case).
Again, replace the paths with whatever values are appropriate for your installation. Locate library filesThe library files should (by default) be located at
Specify compiler/linker flagsAssuming your
And the library paths into
All together (call the configure script):
If the script passes, you should be able to build with the |
thanks for the reply make |
Ok, I see. I'll modify the build scripts to make this easier. |
Let me know if this works: Make sure you're synced to the latest commit:
Pass the SDL2 and SDL2_ttf prefix directories as configuration variables:
Call make:
Make sure you're specifying prefix directories, i.e. the directories should have |
did as you suggested but now on I type: getting this checking for gcc... gcc is that a problem since I have SDL2 inside /opt/homebrew/Cellar instead /usr/local/Cellar ? |
Use:
|
awesome, worked ./configure --with-sdl-prefix=/opt/homebrew/Cellar/sdl2/2.30.9 --with-sdl-ttf-prefix=/opt/homebrew/Cellar/sdl2_ttf/2.22.0 cd src && /Library/Developer/CommandLineTools/usr/bin/make all |
Awesome, thanks for opening this issue. The emulator currently only supports mapper #0 games. |
Hi,
thanks for sharing the project, actually im on a MacOS Sequoia 15.1, followed your instructions but stuck at:
make
cd src && /Library/Developer/CommandLineTools/usr/bin/make all
/Library/Developer/CommandLineTools/usr/bin/make -C ./audio all
gcc -g -O2 -Wall -O0 -I.. -c apu.c -o apu.o
In file included from apu.c:1:
In file included from ./apu.h:4:
./../system.h:10:10: fatal error: 'SDL2/SDL.h' file not found
10 | #include <SDL2/SDL.h>
| ^~~~~~~~~~~~
1 error generated.
make[2]: *** [apu.o] Error 1
make[1]: *** [audio/apu.o] Error 2
make: *** [all] Error 2
i have installed SDL2 at this path:
/Library/Frameworks/SDL2.framework
and added in the $path over .zshrc
export PATH=/opt/homebrew/opt/curl/bin:/opt/homebrew/opt/openssl@3/bin:/Library/Frameworks/SDL2.framework/Headers:$PATH
did also .zshrc and restarted the terminal but no way the ./configure keep saying no SDL found
ecking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for stdint.h... (cached) yes
checking for time.h... yes
checking for SDL2/SDL.h... no
checking for SDL2/SDL_ttf.h... no
checking for stdarg.h... yes
checking for stdio.h... (cached) yes
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking for a BSD-compatible install... /usr/bin/install -c
configure: creating ./config.status
also did installed with brew but nothing
... any ideas ?
regards
The text was updated successfully, but these errors were encountered: