-
Notifications
You must be signed in to change notification settings - Fork 139
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
Would like to be able to disable DLLEXPORT #96
Comments
Another alternative is to allow #ifndef UTF8PROC_DLLEXPORT
# ifdef _WIN32
# ifdef UTF8PROC_EXPORTS
# define UTF8PROC_DLLEXPORT __declspec(dllexport)
# else
# define UTF8PROC_DLLEXPORT __declspec(dllimport)
# endif
# elif __GNUC__ >= 4
# define UTF8PROC_DLLEXPORT __attribute__ ((visibility("default")))
# else
# define UTF8PROC_DLLEXPORT
# endif
#endif |
see PR #85 |
Thanks for that reference @vtjnash FWIW, the reason for wanting to disable the visibility setting is this: I want to create my own shared library. In that shared library I want to link utf8proc statically, for use by my library. And I don't want the symbols from my utf8proc to be published to users of my shared library: they might by trying to link with their own version of libutf8proc.so which differs from mine in some way, or maybe they even have some other .so which happens to use the same symbol name, etc. Whatever the reason, my library is not intended to provide a utf8 interface I'm only using that internally. When I compile my code I use the So, that's why I need to disable the "default" visibility setting in utf8proc (and also the Cheers! |
First of all, thanks for the suggested workarounds above. Me too: the optional ability to build a static library instead of a dynamic library would be very welcome. |
Closed by #123. |
In my system I'm linking utf8proc as a static library, into my shared library and I don't want the utf8proc symbols to be visible outside my shared library (in case the user of my shared library has their own version of this library or even other code which has symbol conflicts, in other libraries, etc.)
However currently there's no way to turn off the DLLEXPORT stuff in utf8proc.h. I'd appreciate it if there were a controlling macro I could add to my CFLAGS that would disable it, maybe something like:
or something along those lines; I can add
-DUTF8PROC_NO_DLLEXPORT
to CFLAGS to avoid any exporting.The text was updated successfully, but these errors were encountered: