Skip to content

Commit 094ea2f

Browse files
committed
Add docs about symbol visibility
1 parent cdfe28f commit 094ea2f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,19 @@ end
8181

8282
Otherwise, you can inline the dir to `deps/fine/include`.
8383

84+
> #### Symbol visibility {: .info}
85+
>
86+
> When using GCC and Clang it is recommended to compile with
87+
> `-fvisibility=hidden`. This flag hides symbols in your NIF shared
88+
> library, which prevents from symbol clashes with other NIF libraries.
89+
> This is required when multiple NIF libraries use Fine, otherwise
90+
> loading the libraries fails.
91+
>
92+
> ```shell
93+
> # GCC/Clang (Makefile)
94+
> CPPFLAGS += -fvisibility=hidden
95+
> ```
96+
8497
## Usage
8598
8699
A minimal NIF adding two numbers can be implemented like so:

0 commit comments

Comments
 (0)