From 76c6184c491ecbdb7f7ac1e05af3056b84ec9ff2 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Tue, 6 Jul 2021 19:13:17 +0200 Subject: [PATCH] Added a note to build as shared library #146 --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index b35fee9..f0c848f 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,13 @@ or use the provided `GuiIconText()` function to prepend it automatically, using if (GuiButton(rec, GuiIconText(RICON_FILE_OPEN, "Open Image"))) { /* ACTION */ } ``` +## building as shared library + +`raygui` is intended to be used as a portable library to be integrated in code form into the target project but some users could require a shared/dynamic version of the library, for example, to create bindings. In that case, `raygui` can be built as a shared library using: +``` +mv src/raygui.h src/raygui.c && gcc -shared -fpic -DRAYGUI_SUPPORT_ICONS -DRAYGUI_IMPLEMENTATION -lraylib -lGL -lm -lpthread -ldl -lrt -lX11 src/raygui.c -o raygui.so +``` + license -------