-
Notifications
You must be signed in to change notification settings - Fork 14
exceptions/exception.h: Try fixing linking on MinGW #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I don’t understand the new macro changes |
Hi @neheb, The thing is, we want to differentiate between Visual Studio builds and MinGW builds where it is necessary, because we need to export the whole |
Adding both dllexport and visibility on the same define is weird. They do the same thing on mingw. |
Hi @neheb, So, does the update fix your problem? I can always drop dllexport or visibility if things at this point did work for you (merely doing what is done in GLib). |
The cross compiler in MinGW can build libxml++ with this fix, both with and without I've installed Please merge, unless @neheb has a better idea. |
Using the xmlpp::exception class may lead to a linker error on its vtable on MinGW, unless the whole class is exported, but we also want to avoid exporting that whole class under Visual Studio, so that we can avoid having the built DLL/import library being tied to a particular STL version, so define macros to accomdate such situations and apply it to the xmlpp::exception class. This should not affect the ABI stability on Visual Studio builds. Fixes: libxmlplusplus#45
6ff6169
to
fddcb23
Compare
Hi, Thanks for the ack (I decided to drop the |
Yesterday I tested
and
Now you've chosen
That does not work with the MinGW compiler. The gcc manual says in the description of
|
Oh, sorry... I will fix that in a bit, when I get my hands on my computer when I get back home. Sorry about that |
Apparently it's not enough to decorate a class with __attribute__((visibility("default"))), so also decorate it with __declspec(dllexport), via macros as needed. Pointed out by Kjell in PR #46.
Okay now. |
Hi,
This attempts to make updates to
libxml++config.h.[in|meson]
so that we can accomodate exporting the wholexmlpp::exception
class on MinGW builds but only export selectively on Visual Studio builds so that we can fix issue #45 (for MnGW) and also avoid having the built binaries from being ABI unstable by avoiding it being tied to a particular STL version.With blessings, thank you!