4 ms·
As a small criticism, looking at the project page I get no clue whether this library works on Microsoft Windows.
by random_upvoter 9y ago
As a small criticism, looking at the project page I get no clue whether this library works on Microsoft Windows.
- jstimpfle 9y ago"C89", "no dependencies". That pretty certainly means "yes".
- random_upvoter 9y ago"no depencies" until you actually want to use it. Because then of course you'll have to link with some non-standard library that can actually paint pixels on the screen. That was precisely what confused me.
- billsix 9y agoYes it works on windows. Hopefully this does not come across as rude, but from the readme "It was designed as a simple embeddable user interface for application and does not have any dependencies, a default renderbackend or OS window and input handling but instead provides a very modular library approach by using simple input state for input and draw commands describing primitive shapes as output. So instead of providing a layered library that tries to abstract over a number of platform and render backends it only focuses on the actual UI." Under the demo folder, there are examples. Nuklear works with opengl 2 and 3 both with sdl2 and glfw (both of which support windows) it works with direct 3d 9 and 11, with gdi (windows specific libraries)
- random_upvoter 9y agoYes, I did see the readme and I do remember thinking "so does this means it runs on Windows as well?". It's not unheard of for linux-specific projects to simply ignore the existence of Microsoft world. So I cloned the repository and opened up nuklear.h. If this library supports Windows, then CERTAINLY this file has to include "Windows.h", somewhere, right? Uhm.. no, it does not. Bad sign, I thought. So, still confused, I thought "so let's look into this folder called "example". I look into canvas.c and I notice "#include <GL/glew.h>". So I thought "Oh dear, this is gonna be a bother to compile on Windows, forget it". As luck would have it, I never looked into the folder called "demo". So at that point I honestly believed that this library was only sort of "semi-supported" on Windows, as often happens with these kind of projects. You know, the usual "if you're a bit of a masochist and you're willing to muck around with mingw and download glib.tar.gz stuff, you may get this to work". The fact that the GUI has a definite linux look reinforced that impression. What I'm saying is, all my confusion could have been solved by just one line in the readme explicitely stating "this builds on Microsoft Windows using Visual Studio and a direct X backend, etc...". A little bit of redundancy, it helps sometimes.
- merlish 9y agoThat would be a bit inaccurate though - the core library doesn't have a backend. The example you found e.g. implements an OpenGL backend. It doesn't reference any external libraries (maybe C runtime). IIRC it does not assume you have a malloc() function by default; you provide one or use a #define before include to tell the header it can rely on standard malloc.
- deleted 9y ago[deleted]
- FraKtus 9y agoYes you have a win32 and direct x 9 and 11 backend...
- FraKtus 9y agoAnd to add more, this is one of my favourite about it, it's very easy to have a tiny .exe with no DLL dependencies thanks to that...