|
From: Soren A. <so...@wo...> - 2000-12-20 21:18:25
|
Greetings Tor, On 20 Dec 2000, an entity purporting to be Tor Lillqvist [Tor Lillqvist <tm...@ik...>] wrote [regarding Re: [Mingw-users] Re: Final Q on libjpeg dll buil] > I would like to raise an important point about this code: It is not > good to use a generic identifier like "BUILD" (which is quite likely > to clash with some end-user source code identifier) to switch between > dllimport and dllexport in a header file. What if libjpeg is used by > some *other* library, which also is built into a DLL. Then when > compiling *that* library we want the relevant declarations in *that* > library's header files to read as dllexport, but still the > declarations in libjpeg's header files to read as dllimport. The fact that libjpeg is used in *many* other packages is one primary reason I have invested some much personal time in making building it rational, flexible and consistent for me (*YMMV*) and was in fact why I tackled it at this time (weeks ago, I was working on GD.pm ... sniff). > One should use library-specific identifiers, that are unlikely to > clash, like "NOW_COMPILING_LIBJPEG" or whatever. Fervently agree. In fact, I choose to use a different identifier in my custom makefile (which can be accessed in graphic browsers at the url: http://www.wonderstorm.com/techstuff/libjpeg.html now). Each to his[her] own. soren andersen |