www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Win Headers

reply "frustrated2" <frustrated2 aol.com> writes:
Are there complete windows headers and if yes where can i find 
them and will they work for 64bit?
Dec 11 2013
next sibling parent reply "evilrat" <evilrat666 gmail.com> writes:
On Wednesday, 11 December 2013 at 09:04:32 UTC, frustrated2 wrote:
 Are there complete windows headers and if yes where can i find 
 them and will they work for 64bit?
there is mostly complete headers[1], however it is not and never be ready for x64. also there is Andrej Mitrovic's fork[2] of these, which you can make work with x64 with few(at moment of 2.063 due to bugs) to none manual fixes. [1] http://www.dsource.org/projects/bindings/wiki/WindowsApi [2] https://github.com/AndrejMitrovic/DWinProgramming/tree/master/WindowsAPI
Dec 11 2013
parent reply "frustrated2" <frustrated2 aol.com> writes:
thanks for your reply. its a shame that the language does not 
supply ready to use headers. i can live with missing libraries, 
but not with incomplete or non working bare minimal prerequisites 
to use it with an os.
that is a sad and sorry state!

On Thursday, 12 December 2013 at 05:30:29 UTC, evilrat wrote:
 On Wednesday, 11 December 2013 at 09:04:32 UTC, frustrated2 
 wrote:
 Are there complete windows headers and if yes where can i find 
 them and will they work for 64bit?
there is mostly complete headers[1], however it is not and never be ready for x64. also there is Andrej Mitrovic's fork[2] of these, which you can make work with x64 with few(at moment of 2.063 due to bugs) to none manual fixes. [1] http://www.dsource.org/projects/bindings/wiki/WindowsApi [2] https://github.com/AndrejMitrovic/DWinProgramming/tree/master/WindowsAPI
Dec 11 2013
parent reply Mike Parker <aldacron gmail.com> writes:
On 12/12/2013 4:44 PM, frustrated2 wrote:
 thanks for your reply. its a shame that the language does not supply
 ready to use headers. i can live with missing libraries, but not with
 incomplete or non working bare minimal prerequisites to use it with an os.
 that is a sad and sorry state!
I don't see why. Win32 bindings aren't shipped with Java or Python and several other languages. Even C and C++, except for maybe one of the MinGW distros. Even with VC, you still have to download the Windows SDK separately. Should DMD ship with X-Windows bindings, too? What about Cocoa on OS X? I would be content if DMD did not ship Win32 bindings at all, except for the minimal needed to implement cross-platform stuff in Phobos. As it stands, the static libs for the Win32 API that ship with DMD are old and don't include a good number of modern functions anyway. IMO, complete OS API bindings *should* be separate. I wouldn't expect them with the compiler. --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
Dec 12 2013
next sibling parent reply "bearophile" <bearophileHUGS lycos.com> writes:
Mike Parker:

 I would be content if DMD did not ship Win32 bindings at all, 
 except for the minimal needed to implement cross-platform stuff 
 in Phobos. As it stands, the static libs for the Win32 API that 
 ship with DMD are old and don't include a good number of modern 
 functions anyway. IMO, complete OS API bindings *should* be 
 separate. I wouldn't expect them with the compiler.
I prefer languages with more "batteries included". Bye, bearophile
Dec 12 2013
parent reply "frustrated2" <frustrated2 aol.com> writes:
I prefer languages with more "batteries included" - for sure. its 
a nice compiler, love the language, but i do not want to waste 
the time to do everything myself. even basic compilers (yuck) 
offer more tools, windows programming and db stuff than D.


On Thursday, 12 December 2013 at 09:49:31 UTC, bearophile wrote:
 Mike Parker:

 I would be content if DMD did not ship Win32 bindings at all, 
 except for the minimal needed to implement cross-platform 
 stuff in Phobos. As it stands, the static libs for the Win32 
 API that ship with DMD are old and don't include a good number 
 of modern functions anyway. IMO, complete OS API bindings 
 *should* be separate. I wouldn't expect them with the compiler.
I prefer languages with more "batteries included". Bye, bearophile
Dec 12 2013
parent Mike Parker <aldacron gmail.com> writes:
On 12/12/2013 8:20 PM, frustrated2 wrote:
 I prefer languages with more "batteries included" - for sure. its a nice
 compiler, love the language, but i do not want to waste the time to do
 everything myself. even basic compilers (yuck) offer more tools, windows
 programming and db stuff than D.
I appreciate that some people prefer the "batteries included" approach. I was basically responding to your remark that it's a "sad and sorry state." I felt that was a bit extreme, given that more complete Windows API bindings do exist.
Dec 12 2013
prev sibling parent reply "Regan Heath" <regan netmail.co.nz> writes:
On Thu, 12 Dec 2013 08:18:51 -0000, Mike Parker <aldacron gmail.com> wrote:

 On 12/12/2013 4:44 PM, frustrated2 wrote:
 thanks for your reply. its a shame that the language does not supply
 ready to use headers. i can live with missing libraries, but not with
 incomplete or non working bare minimal prerequisites to use it with an  
 os.
 that is a sad and sorry state!
I don't see why. Win32 bindings aren't shipped with Java or Python and several other languages. Even C and C++, except for maybe one of the MinGW distros. Even with VC, you still have to download the Windows SDK separately.
I don't believe this last statement is true. I am fairly certain that upon installing VC you have everything you need to call/use Win32 functions. The only reason to download/install a separate SDK is if your VC version is older and you want a newer SDK/API.
 Should DMD ship with X-Windows bindings, too? What about Cocoa on OS X?
How big are they? If we're just talking about D "header" files then I am all for it, the more the merrier. It's not like internet bandwidth or hard disk space is currently an issue and it will only become less of an issue the more time rolls on. If people are really anxious about this, why not have a separate download for windows and the various flavours of UNIX.. wait a minute, we already do. :)
 I would be content if DMD did not ship Win32 bindings at all, except for  
 the minimal needed to implement cross-platform stuff in Phobos.
This is more or less the current situation right? Last time I tried to do any Win32 stuff in D there were enormous gaps.. this is one reason I don't have any current projects using D.
 As it stands, the static libs for the Win32 API that ship with DMD are  
 old and don't include a good number of modern functions anyway. IMO,  
 complete OS API bindings *should* be separate. I wouldn't expect them  
 with the compiler.
Sure, if we're talking about DLL/LIB files then I agree, we don't want to be shipping these with the compiler. They should be obtained from official channels i.e. downloading the windows SDK. However.. Does DMD support the M$ dll/lib format or is that still an issue? I know there is a conversion tool, but IIRC you have to pay for that.. this hassle was another reason I stopped using D for my personal projects. R -- Using Opera's revolutionary email client: http://www.opera.com/mail/
Dec 12 2013
next sibling parent "evilrat" <evilrat666 gmail.com> writes:
On Thursday, 12 December 2013 at 11:08:41 UTC, Regan Heath wrote:
 Does DMD support the M$ dll/lib format or is that still an 
 issue?  I know there is a conversion tool, but IIRC you have to 
 pay for that..  this hassle was another reason I stopped using 
 D for my personal projects.
with -m64 DMD using MS toolchain, but x86 uses optlink and probably never support COFF libs. what payment do you talking about? i mean there is two tools - coffimplib(you can get it from digital mars ftp) and something like implib(i don't remember its name correctly), both are free afaik.
Dec 12 2013
prev sibling parent reply Mike Parker <aldacron gmail.com> writes:
On 12/12/2013 8:08 PM, Regan Heath wrote:

 MinGW distros. Even with VC, you still have to download the Windows
 SDK separately.
I don't believe this last statement is true. I am fairly certain that upon installing VC you have everything you need to call/use Win32 functions. The only reason to download/install a separate SDK is if your VC version is older and you want a newer SDK/API.
Oh, I was sure I had to install the SDK when I installed the VC Express. But I see now that it is included.
 Should DMD ship with X-Windows bindings, too? What about Cocoa on OS X?
How big are they? If we're just talking about D "header" files then I am all for it, the more the merrier. It's not like internet bandwidth or hard disk space is currently an issue and it will only become less of an issue the more time rolls on. If people are really anxious about this, why not have a separate download for windows and the various flavours of UNIX.. wait a minute, we already do. :)
It's not the bandwidth or disk size that bothers me. It's mostly a matter of maintenance. I appreciate the "batteries included" approach as far as Phobos is concerned, but given that DMD aims to be a cross-platform compiler, I don't think platform-specific API bindings should fall into that category. I mean, all these years and the Win32 bindings are still incomplete, while there are a couple of complete (or mostly complete) third-party bindings out there that do a good job of staying relevant. Why is that? Because Win32 bindings are not a priority for the DMD team. If they aren't a priority, then why ship them? Maintenance is going to depend on community members anyway. Much more efficient, IMO, as a user to use the third-party bindings. It would be different if DMD were Windows-centric, or if it didn't have a platform abstraction in the form of Phobos. Platform API bindings basically provide system functions and GUI functions. IMO, let Phobos abstract away the system and third-party libs abstract away the GUI. Beyond that, I can't imagine that those needing direct API access beyond a handful of functions will be more than a minority. So for them, let third-parties handle the API bindings too. I haven't done any straight-up Win32 development in years and when I do need a Win32 function, it's usually one that isn't available in the ancient libs DMD ships so I have to prototype it and load it manually anyway. But if I do need more of the Win32 API, then I have no problem using an external lib for it. Especially if that lib supports dub.
 I would be content if DMD did not ship Win32 bindings at all, except
 for the minimal needed to implement cross-platform stuff in Phobos.
This is more or less the current situation right? Last time I tried to do any Win32 stuff in D there were enormous gaps.. this is one reason I don't have any current projects using D.
From what I can tell, there's more in there than what Phobos actually uses. But because it's incomplete, it's essentially useless.
 As it stands, the static libs for the Win32 API that ship with DMD are
 old and don't include a good number of modern functions anyway. IMO,
 complete OS API bindings *should* be separate. I wouldn't expect them
 with the compiler.
Sure, if we're talking about DLL/LIB files then I agree, we don't want to be shipping these with the compiler. They should be obtained from official channels i.e. downloading the windows SDK.
The static libs for DMC need to be shipped for 32-bit programs. There's just no way around that. But they desperately need updating. I believe they don't include anything beyond Windows XP. With the dependence on VC for 64-bit, that goes away for 64-bit apps. But you still have the problem of maintaining compatibility between 32- and 64-bit versions if that's a priority. At any rate, it's not going to kill me if all of the platform API bindings are included. As long as they're complete and well-maintained, then no big deal.
Dec 12 2013
parent "Regan Heath" <regan netmail.co.nz> writes:
On Thu, 12 Dec 2013 12:16:57 -0000, Mike Parker <aldacron gmail.com> wrote:

 On 12/12/2013 8:08 PM, Regan Heath wrote:

 MinGW distros. Even with VC, you still have to download the Windows
 SDK separately.
I don't believe this last statement is true. I am fairly certain that upon installing VC you have everything you need to call/use Win32 functions. The only reason to download/install a separate SDK is if your VC version is older and you want a newer SDK/API.
Oh, I was sure I had to install the SDK when I installed the VC Express. But I see now that it is included.
Ah, and I hadn't thought of Express as I've only used Professional etc. Good to know.
 Should DMD ship with X-Windows bindings, too? What about Cocoa on OS X?
How big are they? If we're just talking about D "header" files then I am all for it, the more the merrier. It's not like internet bandwidth or hard disk space is currently an issue and it will only become less of an issue the more time rolls on. If people are really anxious about this, why not have a separate download for windows and the various flavours of UNIX.. wait a minute, we already do. :)
It's not the bandwidth or disk size that bothers me. It's mostly a matter of maintenance. I appreciate the "batteries included" approach as far as Phobos is concerned, but given that DMD aims to be a cross-platform compiler, I don't think platform-specific API bindings should fall into that category. I mean, all these years and the Win32 bindings are still incomplete, while there are a couple of complete (or mostly complete) third-party bindings out there that do a good job of staying relevant. Why is that? Because Win32 bindings are not a priority for the DMD team. If they aren't a priority, then why ship them? Maintenance is going to depend on community members anyway. Much more efficient, IMO, as a user to use the third-party bindings. It would be different if DMD were Windows-centric, or if it didn't have a platform abstraction in the form of Phobos. Platform API bindings basically provide system functions and GUI functions. IMO, let Phobos abstract away the system and third-party libs abstract away the GUI. Beyond that, I can't imagine that those needing direct API access beyond a handful of functions will be more than a minority. So for them, let third-parties handle the API bindings too. I haven't done any straight-up Win32 development in years and when I do need a Win32 function, it's usually one that isn't available in the ancient libs DMD ships so I have to prototype it and load it manually anyway. But if I do need more of the Win32 API, then I have no problem using an external lib for it. Especially if that lib supports dub.
Fair enough, I hadn't thought of it from that perspective. I agree, maintenance would not, and should not be a high priority for the maintainers of D/MD. The issue for me is then one of perception and hassle. If I am a new windows based D user and I download the installation and immediately struggle to interface with Win32 I might make the effort to go looking for these third-party bindings, I might find one which has what I need, and I might manage to get it working but that is a lot more hassle than it could be, it is enough hassle that some people might simply give up at this point - especially existing C/C++ users who have it easy currently. There is a totally different mentality in the windows world, we are far too used to everything "just working" out of the box. I absolutely detest the (I suspect somewhat less common than last time I had to do this) UNIX-land practice of having to download and compile dependency after dependency just to get something simple working. The same perception applies to programming languages and libraries, tho programmers are more likely to stick at it if for nothing other than the challenge it represents. So.. I think "D" ought to give it's blessing to one third-party Win32 library and link it prominently on the download page at the very least (apologies if this is not already the case but I haven't looked in a while), even better would be a mechanism where the installation itself would automatically obtain the library (using dub perhaps) if selected by the user. The same argument applies to other platforms and SDKs, in an ideal world they would all be downloaded/installed by the DMD installation if selected by the user. The same applies to GUI libraries, I think a vanilla Win32 GUI library needs to exist and be prominently linked or "included" via the installation. I think many new D users are turned off by the task of trying to piece all this together right off the bat. I realise this is a fair bit of work, but I think lowering the bar for entry should be a very high priority as the more people we can get on board the better and the sooner the better. More people means more exposure and more contributions, two things I think D needs most.
 I would be content if DMD did not ship Win32 bindings at all, except
 for the minimal needed to implement cross-platform stuff in Phobos.
This is more or less the current situation right? Last time I tried to do any Win32 stuff in D there were enormous gaps.. this is one reason I don't have any current projects using D.
From what I can tell, there's more in there than what Phobos actually uses. But because it's incomplete, it's essentially useless.
Well.. not useless, but certainly not all that useful and it reflects poorly IMO. R -- Using Opera's revolutionary email client: http://www.opera.com/mail/
Dec 12 2013
prev sibling parent "Rikki Cattermole" <alphaglosined gmail.com> writes:
On Wednesday, 11 December 2013 at 09:04:32 UTC, frustrated2 wrote:
 Are there complete windows headers and if yes where can i find 
 them and will they work for 64bit?
I've also generated from Mingw64 windows static binding[1]. So it definitely will work with Windows 7 64bit. However I've only tested some of the GDI parts for DOOGLE. So its kinda don't count on it. [1] https://github.com/rikkimax/DOOGLE/tree/master/source/WindowsAPI
Dec 12 2013