[vtk-developers] Removed windows.h from VTK headers.

Brad King brad.king at kitware.com
Fri Dec 17 09:35:12 EST 2004


John Biddiscombe (CSCS) wrote:
>> If VTK does not include windows.h everywhere then there is no place to 
>> do this undef.  User code can still include a VTK header and then 
>> afterwards include windows.h.  Then their call to GetClassName will 
>> break.
> 
> OK. I give in. You've clearly given this more thought than I. Here's my 
> last go...I shared Sebastien's horror at the sight of the PropInternal 
> stuff, why not simply put the same #defines that used to be in windows.h 
> into setget.h, that way everything will be exacly the same as before and 
> if windows.h is included it'll just be a second definition of the same 
> thing. No RemovePropInternal and associated stuff? (SetGet or 
> WindowsNameMangling.h can have #ifdef unicode etc etc and mimic the old 
> mangling)

This solution still forces the mangling upon user code.  Not all VTK 
applications include a VTK header in every source file.  If the user 
code has any methods that have this mangling problem then including a 
VTK header will mangle it.  This will cause linker errors in the user 
code just because they included a VTK header.

I've documented the motivation and implementation of these changes here:

VTK/Utilities/Upgrading/README.WindowsMangling.txt

-Brad



More information about the vtk-developers mailing list