I'm trying to update the vcpkg port to v2.5. Still there seems to be some problems and I have to apply some patch to get it work.
Also please accept my apologize for my submitting the patch to vcpkg without asking for your opinion first. I was new to opensource projects and made a mistake.
fix_arma_sprintf.patch: fix sprintf name conflict with armadillo. VS implemented it's own sprintf in later version, so redirecting to _sprintf makes std::sprintf not working.
fix_attribute.patch: MGL_FUNC_INIT and MGL_FUNC_FINI not defined issue.
fix_default_graph_init.patch: mglDefaultGr is initialized in DllMain, so it causes the similar problem as the Font. I Fixed it by disabling mglDefaultGr initialize in DllMain, it will be initialized on first use. Not sure if this has any side effect since mglDefaultGr itself is also exported.
fix_mglDataList.patch: All dlls shares the MGL_EXPORT marco, but in widgets dlls they need to import the classes from mgl.dll. Other (inlined) classes only causes a redefinition(central part of the picture below), but mglDataList is not defined in widgets dlls, so msvc can't find it. This patch is a really dirty solution, but it changes least code.
For the last redefinition problem, I also tried to separate the marcos used in widgets dlls. Maybe that is cleaner, but it needs to change lots of files.
I'm still working on this repo so it may not work, but it basially shows the idea.
Tianyi