Open ynfle opened 2 years ago
I don't have a Catalina device handy, so all I can say from here is that these are linker errors from being unable to find functions provided by SDL. I would suggest you make sure that you can link something else with the SDL library you have installed. Some of the missing symbols are provided by both SDL and SDL2, but SDL_GetVideoSurface() and SDL_SetVideoMode() are only in SDL 1.2, which seems to conflict with the build target of SDL2_gpu.
So I am able to compile and link the basic sdl2 program below
#include <iostream>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
using namespace std;
int main() {
if(SDL_Init(SDL_INIT_VIDEO) < 0) {
cout << "SDL init failed." << endl;
return 1;
}
cout << "SDL Init succeeded." << endl;
SDL_Quit();
return 0;
}
with the following command g++ `sdl2-config --libs` `sdl2-config --cflags` test.cpp
based on https://stackoverflow.com/questions/28016258/using-homebrew-installed-sdl2-with-xcode
I'm not sure if this helps, makes a difference or anything.
Thanks in advance for your help