I am trying to use SDL in Xcode. I included the necessary header files. However, I keep getting error messages at compilation that look like this: Undefined symbol: _AudioObjectAddPropertyListener. I keep getting 100 of these error messages. My code to test SDL looks like this: if (SDL_Init(SDL_INIT_VIDEO)) {cout << "SDL init failed \n";return 1;} else {cout << "SDL Init succeeded \n";SDL_Quit();return 0;}
I'm not sure if I included the libraries in the correct way. I tried googling "undefined symbol error Xcode SDL" and none of the results helped me solve my problem.
I have a screenshot of the error messages below.
Steps:
-L/usr/local/lib -lSDL2 -lm