Temple of The Roguelike Forums
Development => Programming => Topic started by: Krice on June 07, 2015, 11:30:40 AM
-
I was unable to compile FLTK on OSX (because clang error about x86_64 architecture) and also in Windows, because make gives error "makeinclude: no such file or directory". So I can't even get started with FLTK. I don't know, is it too much to release compiled libraries to Windows? The source code of FLTK looks horrible by the way, there are memsets and macros all over the place in C++ classes. When compiling in OSX the compiler gave couple of warnings about crappy code, can't describe it otherwise.
The other library I took a brief look was wxWidgets, but it's just too large and complex library and programming it seems to be similar C++ experience with macros and all that crap. Why they had to use C++ (wrap in classes) if it's badly written C?
I just need a GUI library with basic dialogs, especially a file dialog and menus etc.
-
Hm, I've used curses. It's pretty good.
-
The other library I took a brief look was wxWidgets, but it's just too large and complex library and programming it seems to be similar C++ experience with macros and all that crap. Why they had to use C++ (wrap in classes) if it's badly written C?
I just need a GUI library with basic dialogs, especially a file dialog and menus etc.
wxWidgets was born in the 1990s, when everyone was thinking that macros were OK, nobody had ever heard of design patterns and OOP was considered just that -- C with classes. I agree that it is overloaded with features you will probably never use and carries a lot of legacy crap. Not a good choice for games or small RAD tools.
I had the same problem about 10 years ago when I was looking for a GUI library for my game. Eventually I chose something that wasn't quite a GUI library (Irrlicht) and modified it to suit my needs. It's not really great as GUI, but it has one major kick-ass advantage: it's simple. Whenever I need to extend it, I can do it. Whenever something breaks, I'm able to debug it and I actually understand the code behind the GUI, because it is simple. This simplicity, of course, contributes to tiny size of the source code. And there are no macros -- well, almost :).
-
I need a GUI library for tool development which means menus, file dialogs and all that boring stuff. Otherwise I would use SDL1 or 2 as I have used this far. I went through the list in wiki of free GUIs and looks like they all suck one way or another. I don't know why FLTK (the library itself) doesn't compile on Windows, maybe I should try to solve that problem and then try again.
I think it's odd to live in a world of technology and innovations, but when you look at these GUIs..
-
The library I'm talking about does have menus and file dialogs and I actually use it in some tools like map editor.
-
Qt isn't bad choice either in my experience. Very easy to get started and create applications with default controls. And when they aren't enough, you can always write your own (although this is something I haven't had to do).
-
The library I'm talking about does have menus and file dialogs and I actually use it in some tools like map editor.
Yes. I'm going to try that. The release zip had everything included (over 3000 files) which was kind of not very cool, but the library itself seems to be compact. Now I just need to rebuild my motivation to do any programming.
-
It was quite easy to set up Irrlicht, you just do not use the ready template of Code::Blocks, but create an empty project and set up library yourself. However when running I get this message:
The procedure entry point __gxx_personality_v0 could not be located in the dynamic link library libstdc++-6.dll.
I guess it's some kind of.. well.. not sure what it is. Probably something gcc related. I do have the latest gcc that was included with latest stable Code::Blocks release. I could maybe google that "personality".
-
..something gcc related.
Looks like there are two types of exception handling built-in in different gcc installations. Great. And Irrlicht seems to be using dw2 instead of sljllsldl-something. One suggested fix was rebuild Irrlicht. Grrreat.. I may just try it if I don't have anything else to do.
-
It was much easier to set up Irrlicht with Visual Studio, but I noticed right away that the executable takes constant 50% processor time even with completely empty loop running (not even drawing anything). For games it's ok I guess if everything is on anyway, but for tool programs it's not acceptable. So.. time to look for the next GUI library..
-
You give up so easily that I doubt you'll ever accomplish any programming task. Come on, this is a trivial problem and it exists in any modern graphics library. A million of people has already solved it. Stop complaining and use Google. "Next library" won't help you if you expect it to solve every problem you can possibly encounter.
-
Now that you reminded me SDL has same kind of problem in default event handling. The reason I give up easily is over 20 years of programming. You get sensitive to certain things.
-
I'm actually going to try to program that file dialog for SDL. It's the only GUI part missing, with addition of a working slider implementation. It's probably easier than re-writing everything to another GUI library, although with SDL you are restricted to 7-bit characters (=ascii) in filenames.
-
Now that you reminded me SDL has same kind of problem in default event handling. The reason I give up easily is over 20 years of programming. You get sensitive to certain things.
Getting a library to not hog the cpu is generally a matter of the person using the library doing it wrong and needing to learn some fundamentals. A call to SDL_Delay in your main loop if none of the API you are using is blocking, at judicious lengths, is I suspect somewhat standard.
-
"Next library" won't help you if you expect it to solve every problem you can possibly encounter.
Well I'd like to get the library fucking work in the first place so I could even try to do something. And I realized I would really like to use something else than SDL2 for 2D painting program (need menus, icons and stuff like that). I guess I have to wait until someone makes that library, because current libraries are from anal depths.