Charles said:
I'd like to develop a simple cross-platform application in C++. I'd
like it to run in Windows, OS X, PC-BSD and Linux. From my research, it
seems I should use Qt or Gtk as a graphical library. Do you agree? Do
you have other tips? How Cygwin could help me? Thanks.
It might be an idea to ask around the specific communities. For
example, ask the Mac communities of what they think of Qt/Gtk apps.
There's a few other ideas.
1) Just write your code in a clean style, using MVC and other good
practices, to make cross platform GUIs much simpler. Clear separation
of GUI and model, should really help. You can write "cross platform"
C++ classes whose behaviour works the same on all platforms. For
example:
class Button {
void Push();
FunctionPointer OnPush;
};
Then you can implement your button differnetly on different platforms.
On Win, you'll use a CButton, On Mac you'll add an NSButton* to the
class's definition, I guess you'll need to write the class's definition
different on different platforms. The point is, you make a simple
consistant API, that does only what you need and no more.
DON'T write a cross platform GUI library
Write a partially complete
but well planned out library that does only what your particular app
needs. Or else you'll spend your whole time doing work you'll never
use.
2) Write the app in C++, but the GUI in REALbasic. REALbasic does have
some issues with it's GUI components and does produce huge executables,
so it's best to avoid if you are doing large projects. REALbasic is
great for small projects, though, like little cross platform utilities.
For medium sized, it's so-so, you won't really gain or lose by using
it.
Most "good apps" tend to have the UI written natively for each
platform... something to keep in mind.