Writing bindings for Qt is still a major undertaking compared to writing bindings for Gtk. There are okish gtk bindings for lots of languages, but Qt bindings are only available for massively popular languages.
Re:Qt 5.10 released
by user5994461 on Thursday December 07, 2017 @06:30PM
(#15875365)
There isn't and has never been a standard C++ ABI. To interface with a C++ dll, you need to compile the executable with the same compiler version and the same flags.
Re:Qt 5.10 released
by AceJohnny2 on Thursday December 07, 2017 @08:49PM
(#15876090)
You're right, it turns out what I was thinking of was just the Name Mangling convention, which looks like it isn't standardized either.
Re:Qt 5.10 released
by user5994461 on Saturday December 09, 2017 @09:38AM
(#15885957)
The name mangling is part of the ABI. It's super complicated in C++ because the functions can be overloaded and have variable amount of arguments. The rules are compiler and version and flags specific.
P.S. Name mangling is what define that the function "int print(char*)" will become "___4print@4" in the compiled DLL. All the functions in a DLL are listable and have a name, that's how they are found.
The original reason for that was ABI compatibility, and being able to provide bindings for various languages which was considered a primary goal. As I recall at the time, there was no C++ ABI standard (or GCC didn't implement it), and it was considered hard to provide bindings of the library to various other languages.
GTK was written in C mainly for that reason.
This also explains why common object-oriented concepts are reimplemented in C in GTK, because them rejecting C++ for ABI reasons didn't mean they rejected the concepts.
This also explains Vala, Gnome's OO language that pre-processes to C, in order to get the best of both worlds. (anyone getting CFront flashbacks?)
History puts everything in context...