I have a couple of custom libraries which use OF code and are built as dlls. Since OF is a static lib each dll get linked with a static copy of OF which means that any static OF variables can potentially contain different values as each dll has it’s own copy of the library. Is this a problem? I’ve run into this issue before and usually solve it by creating all libraries as dlls. However there does not seem to be support for building OF as a dll under Windows.
So since I did not get an answer I went ahead and refactored the code and now can build OF as a DLL under windows and android. Pretty straight forward, although quite a pain. But now I can actually write code as plugins against OF,.
Extremely interested that anybody else is looking into this
Exporting symbols on gcc/clang based systems is possible from build flags alone
on windows you need to manually export symbols
right now i use a super-duper hacky approach to this:
have been thinking of ways to generate these def file, or a way to include oF into a class which is exported, e.g. oF::ofImage, oF::ofTrueTypeFont, etc. But that would make incompatabilities with addons.
would love if we considered marking evrything up with OF_EXPORTS and a compile time flag would activate them all. i completely didn’t think anybody else would want this so i didn’t even dare to ask