I have downloaded SDL2.frameworks from https://www.libsdl.org and installed it into /Libraries/Frameworks/. Then I have pointed xcode a path of frameworks and headers in 'Build Settings', in 'General' 'Frameworks and Libraries' pointed at framework file libSDL2-2.0.0.dylib . The I type #include <SDL2/SDL.h> and try to build the project. It shows 150+ warnings, but if I try to Run the program it says that Library not loaded. Why? what is the problem? I'm using Big Sur OS

I have figured it out.
brew install sdl2cmd+shift+g type /usr/local/includeDisable Library Validations in Signing & CapabilitiesAfter these steps code started to work for me
You need to codesign the Framework.(The command by the Lazy Foo may be not right).
security find-identity
codesign -f -s "XXXX Your signature" SDL2.framework
Don't forget to sign the another hidapi.framework within the ./Versions/A/Frameworks.
codesign -display --verbose=4 SDL2.framework
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With