Suggestion to use common Win32 headers

Vladimir Panteleev thecybershadow at gmail.com
Thu Mar 6 03:45:17 PST 2008


On Wed, 05 Mar 2008 19:53:31 +0200, bobef <bobef at abv-nospam.bg> wrote:

> 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.

I agree with this. Trying to use Tangobos+Tango+DFL in one project makes using Win32 API quite a mess. However, for the reasons Sean mentioned, I suggest that instead of adopting the headers, the libraries introduce a version() block to use the much more complete Win32 bindings project.

-- 
Best regards,
 Vladimir                          mailto:thecybershadow at gmail.com



More information about the Digitalmars-d mailing list