NSImage minimum code set?

I’ve looked at MacOSLib and have been able to easily get a system icon such as PreferencesGeneral. However, I only need to get that image. Loading the entire MacOSLib into my already pretty large app kills xojo performance and compiling takes quite a bit longer. I do understand that the compiler optimizes and all that time is spent removing everything that isn’t used. I’ve tried removing elements from MacOSLib and found it to be too interconnected to be able to just peel off the few lines of code needed to grab the image. Does anyone have those few lines? I have the structures, most of the APIs (as far as I can tell) yet am unable to get a simple extract the works.

Thanks for reading and any guidance.

-hm

There declares should be there, just means you gotta read through the code and copy segments from it.

For my own solution, I tried to keep all the declares in modules. Xojo will strip away unused declares, and this provides the fastest solution to accessing declares (just not the easiest), for some things, I’ve wrapped up those declares in convenience functions (which are still in the modules to get the stripping), but some things are easier implemented when using convenience classes, and I try hard to minimize the usage of these, as it creates a lot of dependencies and every function on a class (used or not) gets included in the build, taking up space & memory.

If you are the slightest bit interested, take a look at https://www.ohanaware.com/appkit/