Welcome to Core32
Core32 is an attempt to gather together the efforts of the people who are porting Win32 headers into D.
For information on other projects with similar goals, see DocComments/Phobos/StdCWindows.
core32 now builds with dsss (2009 May 15)
What was the future of Core32?
It was pretty bleak. The guy who originally ported the Windows API headers disappeared quite a while ago. The current maintainer has lost interest in updating Core32, too. Everyone else just wants to complain about it. No one seems to be really using it. Its freckles turned out to be carcinoma. There are a few known problems, but there doesn't seem to be any point in fixing them.
A new Windows API project seems to be gaining momentum. If it continues to be productive, it makes more sense to join efforts with the new project than continue to spend time with Core32.
and now …
I (L8Night) have returned and got the files to compile under DMD 2.0
This has been for personal reasons, 'cos there is enough working to solve the problems I wish to solve. however the biggest single problem with this port is that parts are in phobos (see below for how we resolved it) and not all the win32 headers where ported as I had assumed that I would start and others would follow or use what I'd demonstrated and write a good automatic tool.
As I posted the port was of the files that are distributed with dmc (not dmd) but I have no idea about the legality of using there "abused" files, again it was to solve a personal issue, that I believe might help others ...
What does version(STANDALONE) do?
Core32 is meant to complement Phobos.
If someone doesn't want to import std.c.windows.windows, they would compile with the version=STANDALONE set.
The default (compiling without the STANDALONE version set) has many of the conflicts with Phobos versioned out.
We've tried to add "version(STANDALONE)" to all of the statements that are also in Phobos. DMD doesn't complain about conflicts until they are actually mentioned in code that uses both. Some of the conflicts were found by tediously comparing std.c.windows to the Core32 files, and other conflicts were found by "blah conflicts with blah" error statements from DMD. I guess if I were smart I'd come up with some sort of automated tool to find all of the conflicts once and for all, but for now I just version out the conflicts when I become aware of them.
Obtaining the code
The latest code is always in the SVN, but .zip archives have been created occassionally and stored in the downloads folder. The latest .zip is core32_2005.04.19.zip. Trac will also create a .zip on-the-fly for a given changeset: Changeset 29 (trunk) - 2006/01/08
If you just want to use the set of Win32 headers, you can download the .zip archive or use the SVN repository.
If you want to suggest additions or changes to Core32, it's best to work off of the SVN repository.
For general Win32 symbols, import win32.api;
For common controls (such as TreeView), import win32.commctrl;
To build the library, run win32/makelib.bat.
Add win32.lib to the DMD command when you're compiling the executable. Either copy win32.lib to your default lib path or add the path of win32.lib in the command sent to DMD.
Quick Start Guide
- Unzip ZIP in \dmd\src\core32
- Open command prompt (cmd.exe=DOX Box).
- Type PATH \dmd\bin;%PATH%
- CD to the core32\win32 directory.
- Exeute makelib.bat
- Copy make32.lib to \dmd\lib directory. This directory is alread in compilers search path.
- CD to \dmd\bin
- Open sc.ini
- Add "%@P%\..\src\core32" to compiler include search path
Resulting sc.ini should look something like this:
[Version] version=7.51 Build 020 [Environment] LIB="%@P%\..\lib";"%@P%\..\..\dm\lib" DFLAGS="-I%@P%\..\src\phobos;%@P%\..\src\core32" LINKCMD=%@P%\..\..\dm\bin\link.exe[/code] 10. Add "import win32.api" to your source files to use it and link with win32.lib
|Status||3 - Alpha|
|Short Description||port of of Microsoft Windows header files: windows, gdi, user, and com|