This repository was archived by the owner on Mar 26, 2020. It is now read-only.
Add support for -fvisibility=hidden and -fvisibility=default flags
#415
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I quote the updated README.md here :
Support for
-fvisibility=hiddenand-fvisibility=defaultDjinni supports both the
-fvisibility=hiddenand the-fvisibility=defaultflags.The symbols that are belonging to the public interfaces that are generated by Djinni are automatically defined to be visible symbols.
To achieve this Djinni is marking the generated code with
PROJECT_EXPORT.PROJECT_EXPORTis defined insupport-lib/djinni_common.hpp.This macro is using the correct attribute specifier for the actual compiler. For more details, please check the macro definition in the
support-lib/djinni_common.hppheader.This
PROJECT_EXPORTdoes nothing in case if you are using the-fvisibility=defaultcompiler flag.This
PROJECT_EXPORTin case if you are using the-fvisibility=defaultcompiler flag.Since the generated headers are including this
support-lib/djinni_common.hpp, you must distribute it together with your library that is using Djinni.Windows
For Windows builds, you must define
BUILDING_DLLbased on your needs.You can define it as a compiler option like
-DBUILDING_DLL.For more details, please check the macro definition in the
support-lib/djinni_common.hppheader.