Suggestion to use common Win32 headers

bobef bobef at abv-nospam.bg
Wed Mar 5 09:53:31 PST 2008


Hi guys,

I run into this problem often. Each [win32] library uses its own win32 headers, typically only what it needs. For example - phobos has some common headers, tango has some minimal win32 headers, dfl has its own, dwt has its own, etc... So if you use more than one of these libraries you run into conflicts. On top of that their win32 headers support is limited and you need yet another headers (which cause even more conflicts) or do what they do - manually copy paste from msdn, which sucks :) 

So how could this be solved? By the adoption of full set of the win32 headers by the both standard libraries - phobos and tango. Such comprehensive set of headers exists in the dsource/bindings/win32 project. So if these headers are present in the std lib, the the other major libraries like dfl, dwt, etc would not need to redefine the win32 api and one would be able to use the same headers which these libraries use, so you won't run into conflicts like void(HANDLE,UINT) does not match void(HANDLE,UINT).

Maybe there is other way around - I don't know, but this seems a pretty good solution to me.

Best regards,
bobef



More information about the Digitalmars-d mailing list