Post

Replies

Boosts

Views

Activity

Reply to Packaging C libs as framework, good idea? If so I have questions
Yes, we're clearly not the general case. We're shipping a cross-platform (ie. Windows/Linux/Mac) SDK and have been updating it to bundle Mac libraries/headers as frameworks. Some of our example code that uses these frameworks has been plain C/C++ CLI executables, common source for all platforms (with a small amount of special cases for each platform in the code and build files, fewer of these is better). We use CMake to build the SDK, and also to build the examples (so double dose of madness to anyone accustomed to just Xcode). Eventually we may have additional examples that use the frameworks correctly as frameworks, but we still want the existing ones to work mostly as-is. I spoke of just headers in my Question 2, but similarly need library search paths that "dive into" bundles to link to the dylibs of course. Others on my team are running with this janky approach and it looks like it's working for us at the moment, and seemingly keeping the Mac special cases in the code and CMake to a minimum. I'm hoping to provide more context to the final go/no-go on this plan. Is this a super oddball scenario for a SDK and are we on our own to figure this out? Or are there at all any others in this same boat? The cross-platform code boat that's using frameworks not quite as intended, that is. How seaworthy is this boat?!
Aug ’22