[Qt-interest] Qt3_support removal
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Tue Jan 12 15:57:14 CET 2010
João Abecasis wrote on Monday, January 11, 2010 7:19 PM:
>> ...
>> You cannot include them if you don't link to the library.
>
> Could we emit an #error in such cases? (Or do we currently do that?)
#error etc. is evaluated by the C/C++ preprocessor which knows nothing about to which library the object is linked to *later on*.
So trying to raise an #error when you #include a given header, but do not link to the corresponding library, is not possible AFAICT. Off course this is not specific to the Qt3Support classes (headers), but to any header/library. But the good thing is you get at least a linker error, in case the #included header contains code which calls methods in that missing library.
Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list