currently I'm trying to create a free, open-source C++ framework to create platform-independent executables. I have to admit I'm not able to set up huge frameworks like wxWidgets or gtk+ on Code::Blocks, although I've followed the tutorials or instructions, it didn't work. Creating projects with Qt was fine, but it's only for free if the created software is open-source.
Now I'm thinking about recreating the GUI support from scratch, like granting WinAPI functions if the platform is Windows, the same for Linux or Mac, if possible. But I haven't found any good solutions or methods for Linux or Mac so far.
My question: Does anybody know if there is something like WinAPI for Linux? Or is there any framework out there that is compatible with CodeBlocks/MinGW and does not make it to complicated to compile?
I've already taken a look at that list some time ago, but I haven't been very successful so far. SFML was one of the first I've tried in combination with TGUI, but without any success. Sometimes I just think I'm too stupid to understand the tutorials... I've tried almost everything... Maybe I'll try something live TnFOX, CEGUI or Tk... but with every framework, I had to face problems with "unresolved externals" and had no idea how to build the libraries.
gtk+ and wxWidgets always had problems with includes or unresolved externals. With gtkmm, g++ complained about missing includes, which I forget to download from that web page. After all of them were included, g++ complained about syntax errors... That's why I really do not like to face with such huge frameworks again and why I want to try to code that from scratch by using the native APIs.
Qt was very nice, but as I understand, it's only for free if I use it open-source. Is that correct?
Qt is very nice, but yes, if you wish to use it to build something to sell they expect to see some money. (It used to be that you were required to know that up-front: you were expressly forbidden to develop with the free version and pay later; I think that requirement has been relaxed in recent versions but I am not sure.)
Development on Linux often requires you to be careful to install matching development packages (foo-devel), which are a separate rpm/yum/whatever command.
The Windows API is an amalgamation of Kernel, User and GDI services. And encompasses other things too, LanManager, Active Directory, COM, DCOM, ... Further more, the Console functions are part of the the GUI.
In Unix, the Kernel is platform dependent. User space is standardized thru POSIX. Graphics are portable libraries, the most common of which is X, which itself has plugable components. Windows has no equivalent, the closest it has is Citrix.
So what in Windows is one big fat (convenient) library, a one stop shop for the whole platform, a Unix system is built from parts.
So, if you're really interested in portable graphics, look to a portable graphics library (SDL, SFML, Qt ...). From a Unix point of view, it doesn't make sense to port the GDI to Unix, because graphics processing isn't part of the OS. This thinking applies to pretty much all of Windows.