Mac Mojave update making me unable to read SDL2 frameworks.

I recently installed the update to Mojave, and it turns out that it has broken a lot of my code. The issue that I have no idea how to fix is my compiler not finding the SDL frameworks. I have definitely linked to them with "-framework SDL2 -framework Cocoa -framework SDL2_image", and this code worked on Sierra. How do I fix it?
Did you have to reinstall everything after updating to Mojave? Perhaps the issue is that you haven't installed SDL2 or it needs to be updated.
Last edited on
The way that installing SDL2 on a mac works is that you drag the libraries into /Libraries/Frameworks. That folder still exists, with everything in it.
I would recommend you to try Xcode simply because of the drag and drop nature of adding frameworks to your application. I would even suggest you to read LazyFoo's mac os tutorial. And you should be able to check the command line instructions and check if it differs to your eclipse command line instructions. (Not asking you to port your main project, just try out the basic tutorial code at lazyfoo).

Other than that, if you would wanna try to old school way of doing this (because I don't know how else to help you, the -framework system shouldn't have had any breaking change from my googling). This came from the SDL2 Mac OS FAQ, so I assume its valid (2008 was 10 years ago, but mac probably cares about backwards compatibility, I think, take this with a grain of salt since I didn't google if these terminal tools are gone, and that these are overall HACKS).

https://web.archive.org/web/20170228232133/http://overooped.com/post/42240519/properly-bundling-frameworks-in-your-application

referenced links for convenience (web archive messes it up):
https://web.archive.org/web/20170228232133/http://overooped.com/post/42240519/properly-bundling-frameworks-in-your-application
http://qin.laya.com/tech_coding_help/dylib_linking.html

These links also show you tools to analyze your framework and see how they work and look like.

You should also consider if you have made a silly mistake, like getting the paths wrong. Or maybe you should create a brand new eclipse project and try to make things fresh and you might fix something by accident.

I also assume this works on your computer, and this is a problem to a computer that doesn't have the framework (like your last topic related to this). Since -framework only matters for other people, and the headers and the dylibs to the framework are in one file so I don't see how that can screw up, since the headers should be the first error if you placed it in the right place.

Also it never hurts to give as much info about your situation as possible, like a super basic 10 line SDL test, the location of the framework (just to be direct, not all people put the frameworks into the frameworks folder), and the full command line log.
Last edited on
Registered users can post here. Sign in or register to post.