ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need to develop an application that would be used as a simulator to test various custom algorithms. As I have never embarked on this kind of work, I need some advice:
1. Which GUI library to use in Linux, GTK+ or FLTK? The simulator application needs to output various non-standard GUI widgets like time-line plots, various graphs like trees, bar charts, pie charts etc. The input from the user can also be visual, for example the user must be able to draw small circles or rectangles or arrows, drag to move these to a new location, expand/contract them etc. I guess these won’t come already built-in, meaning, I will be coding them. In such a case which of the libraries would be easier? Or is there any library that has these non-standard features already built-in?
2. C or C++? I have experience in C, however not much in C++. For the kind of application mentioned above which would offer a better, meaning, a more intuitive and flexible means of programming?
3. Does Linux have the equivalent of dll files as in Windows?
1. GTK2+ is probably the best widget set to use, especially if you might port things later.
2. Use whatever language you're comfortable with. I don't know the details of your requirements so I have no idea if C++ would have any particular advantage over C.
3. On GNU/Linux systems the shared libraries are *.so (shared object) These are the equivalent of the WinDuhs DLLs (dynamically linked libraries). Of course if you meant "Active X" objects, that's a different story - they're not typically used on Linux systems.
Once you get used to proper object orientated programming C++ offers the advantage that you can have
something that acts like a variable but contains functions inside of it.
For example to search for a word in a string (list of letters) stringName.find("word");
I would also suggest QT because it is what i am used to and the official documentation is very
good.
It is very light, very very fast (both at develop time and at run time),and it is really multi-platform.
Is from many years that i compile my sources, WHITOUT changing a single char, under Linux (32 and 64 bits), windows(32 and 64 bits) and AIX(64 bits). (only Makefiles must be a little different)
It has Fluid, a simple and powerful GUI editor.
And simple and powerful is the integration with OpenGl.
from http://www.fltk.org/
"FLTK is designed to be small and modular enough to be statically linked, but works fine as a shared library. FLTK also includes an excellent UI builder called FLUID that can be used to create applications in minutes."
from http://www.fltk.org/documentation.ph...tro.html#intro
"# The "core" (the "hello" program compiled & linked with a static FLTK library using gcc on a 486 and then stripped) is 114K.
# The FLUID program (which includes every widget) is 538k."
and more, don't worry about C or C++.
Fltk apis are C++, but I use to develop my applications and routines in C (also using Fluid)
they stay very well together!
Thanks for all the great input. I will look into QT along with wxWidgets too.
As someone mentioned, certain builders like FLTK seem to prefer C++ or object oriented style of programming and others like GTk+ seem to be Cish in nature(i could be wrong here though). I was just wondering if using C/C++ with such builders would cause any difficulties or handicaps for me.
Hello, I was following this topic and I'm also very interest in doing programs for linux, not very sophisticated though.
I'm not very experienced on programming (used to to some small things in Object Pascal - Delphi) and now I'm using linux. I'd like very much to learn C++ to make GUI apps for linux.
What do you suggest me: QT or GTK2?
I read about Qt on its official website and I reckon it's very tempting.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.