quake2
quake2 copied to clipboard
Crashes on catalina
Starts up okay, but when I try to start a new game it simply crashes. I'm on OS X Catalina. Single display, OpenGL driver.
How did you compile it? I get error when i run Make src/client/input/sdl.c:30:10: fatal error: 'SDL2/SDL.h' file not found
You'll need to install SDL2 via MacPorts or Homebrew.
Hi @jdolan Do we need SDL2 or 1.2
I installed SDL2 via Brew - then added the path to INCLUDE in the MakeFile
ifeq ($(PLATFORM),darwin)
CFLAGS += -D__APPLE__ -I/opt/local/include -I/usr/local/include/SDL2
endif
Then run the MakeFile and i get these and many other similar errors
src/linux/rw_sdl.c:166:7: error: use of undeclared identifier 'SDLK_KP9'; src/linux/rw_sdl.c:283:25: error: use of undeclared identifier 'SDL_FULLSCREEN' src/linux/rw_sdl.c:297:4: error: use of undeclared identifier 'SDL_GrabMode'
what could i be missing?
p.s
Notice that Linux files are getting compiled even tho i go to 'Apple' folder and run Make. I even run Make in root folder, same.
Yes, sorry, SDL 1.2. And yes, it will compile the Linux source files. Those files have some conditional directives for Apple. The Makefile is fairly straightforward. You’ll need sdl-config and curl-config on your PATH.
Cool thanks @jdolan
I added the 1.2 version's "SDL.framework" file to /Library/Frameworks and added the path -I/Library/Frameworks/SDL.framework/Versions/A/Headers to CFLAGS and it compiled fine.
But am getting linker errors
Undefined symbols for architecture x86_64:
"_SDL_CloseAudio", referenced from:
_SNDDMA_Shutdown in snd_sdl.o
"_SDL_CreateRGBSurface", referenced from:
_SetSDLIcon in rw_sdl.o
"_SDL_EnableKeyRepeat", referenced from:
_SDLimp_InitGraphics in rw_sdl.o
"_SDL_FreeSurface", referenced from:
Do i need to add the SDL lib in LDFLAGS variable? The SDL lib is found here /Library/Frameworks/SDL.framework/Versions/A/SDL
Thanks in advance.
Yes, of course you need to also link against it. sdl-config --cflags
and sdl-config --libs
might help you here, too.