1. Nuklear DLL and Wrapper
- Posted by Icy_Viking in May
- 441 views
Hi all,
Just a few minutes ago, I was able to successfully build and compile nuklear into a DLL. I even checked and the functions show up in DLL Export viewer program. Now I can begin working on a wrapper in Euphoria for it.
[https://github.com/Immediate-Mode-UI/Nuklear] Nuklear UI
//C Code #define NK_IMPLEMENTATION //needed to build correctly. #include "nuklear.h" //current header file as of May 21st, 2024. int main() { return 0; } //I added the main function() so it would compile/build correctly.
Commands to compile and build DLL
gcc -c nuklear.c gcc -shared -o nuklear.dll nuklear.o
It wasn't as hard as I thought it'd be. It was actually pretty simple after I found a tutorial. [https://cygwin.com/cygwin-ug-net/dll.html]
I have GCC for Windows installed. I'll post an update or new thread when I have a working wrapper, hopefully very soon.
2. Re: Nuklear DLL and Wrapper
- Posted by ChrisB (moderator) in May
- 430 views
This looks interesting.
Cheers
Chris
3. Re: Nuklear DLL and Wrapper
- Posted by euphoric (admin) in May
- 426 views
Just a few minutes ago, I was able to successfully build and compile nuklear into a DLL. I even checked and the functions show up in DLL Export viewer program. Now I can begin working on a wrapper in Euphoria for it.
[https://github.com/Immediate-Mode-UI/Nuklear] Nuklear UI
Whoa! Very cool! Looks like a decent UI lib.
4. Re: Nuklear DLL and Wrapper
- Posted by ghaberek (admin) in May
- 420 views
//I added the main function() so it would compile/build correctly.
FYI you do not need a main() function when building a shared library. If the compiler is demanding a main() function from you then something is wrong.
Be warned: Nuklear is an immediate-mode GUI, which means several things:
- you are responsible for creating the main window and event loop of the application (typically using GLFW, etc.)
- you are responsible for hooking into the callbacks and drawing everything yourself (typically using OpenGL, etc.)
- the library is only responsible for the "state" of the user interface, such as text content, window sizes, cursor position, etc.
- everything happens within the "plane" of the main window, which means menus, buttons, etc. are no longer native experience
Personally I am not a big fan unless you're using it strictly for the GUI elements within a game.
-Greg