|
|
I'm aware of the problems with macros and that's why I wrote that I don't like that solution. I only mentioned it because ISTR that there was a request to use it for building FLTK and some of the bundled libs offer it. For instance: zlib offers #define Z_PREFIX (configure option) to prefix all zlib symbols with 'z_' (see zconf.h).
I agree that a namespace like Fl_PNG_Lib:: sounds much better. I'd guess that most programs wouldn't even notice the difference because they don't use the image lib functions directly - they would only deal with Fl_PNG_Image etc.. Then, if a program decides to deal with the PNG image format directly, they could either link in the png lib of their own choice or use FLTK's Fl_PNG_Lib:: with the namespace.
However, what would we do with the FLTK code to be able to use either the system libs or the bundled libs? Would we just use the namespace by adding using ... or not, depending on the usage of the bundled lib or not, resp.? Unfortunately I think that we'd have to modify the source code of the bundled libs in a way that makes upgrading more difficult. Currently we're using the bundled lib code unmodified except the build files.
Anyway, this is an interesting idea which seems to be worth investigating ...
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
[ Direct Link to Message ] | |
|
| |