During the last two years I have gone from Python to Java and now to C++. I have been trying it out for a couple of days and during that time I have been coding and compiling using emacs and the command prompt in Ubuntu Linux. I have just started using Netbeans for C++ and right now I am working on implementing GTK in Netbeans. I have a bunch of questions I have not been able to answer using google these last few days.
#1. GUI
In order to be able to do a GUI application in C++ one must first install a kit that works together with the compiler. There are several kits out there, two common are GTK and QT. With a basic C++ compiler, is it impossible to make a GUI without installing one of these packages? Wich one is the better?
#2. IDE
Since I am an experienced Java programmer I like Netbeans, but is there a better Development Environment for C++? Perhaps one that is easy to set up with GUI kits like QT or GTK?
#3. Platforms and re-compiling
I will be developing on a linux machine, but what if I want to distribute my programs to windows users, do I simply compile using a windows compiler that works with my GUI kit, or is there code for linux programs that simply are impossible to re-compile to .exe? Is there something I need to be aware about when coding in Linux if I want to be able to compile my programs to *.exe?
In response to question 3, it depends what you are doing. In all likelihood if you are doing anything remotely complex, you are going to have to change code to make it windows compatible. Directory navigation and system calls are different for creating linux and windows applications and those are going to be the most common areas where you will run into problems. Thats just the start though. You'll enjoy such challenges as converting socket interfaces, threading issues, ... the list goes on and on.
Directory navigation and system calls can be different different on different platforms even when programming using a cross-platform language. What more needs changing? Or is the difference between linux bin and windows exe simply the compilers?
1. There's no way around choosing a GUI framework (besides creating your own). One can't say which is better, there are many people who prefer either Gtk+ or Qt. Gtk+ is commonly used for Gnome/Xfce applications and Qt is generally used for KDE applications.
2. Well, you can do GUI programming with any IDE, but for Qt there is Qt Creator, which allows you to quickly design something. For Gtk+, there are external tools like Glade.
3. If you write platform-independent code, you just have to recompile the project for Windows (using MinGW).
Keeping your code portable is fairly easy as long as you stick to boost and the tools the framework provides to you (particularly Qt has a whole bunch of custom classes not directly related to GUIs).
#1 There are other cross-platform GUI tool-kits you can try. FLTK and wxWidgets spring to mind I am sure there must be more.
#2 If you are used to Netbeans then I doubt there is anything 'better' on linux.
#3 In theory I believe that you could 'cross-compile' and generate Windows code on Linux. In practice its probably easier to just compile it on a Windows box. I recommend using boost for things like threads etc... which is very portable.