jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Sat Oct 09, 2004 12:38 pm Post subject: Introduction to Core32 |
|
|
Core32 is an attempt to gather together the efforts of the people who are porting Win32 headers into D.
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.
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.
Importing
For general Win32 symbols, For common controls (such as TreeView), Code: | import win32.commctrl; |
Building
To build the library, run win32/makelib.bat.
Linking
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.
Examples
TreeView
L8night Project
Quick Start Guide (by saivert)
1. Unzip ZIP in \dmd\src\core32
2. Open command prompt (cmd.exe=DOX Box).
3. Type PATH \dmd\bin;?PATH?
4. CD to the core32\win32 directory.
5. Exeute makelib.bat
6. Copy make32.lib to \dmd\lib directory. This directory is alread in compilers search path.
7. CD to \dmd\bin
8. Open sc.ini
9. Add "?@P?\..\src\core32" to compiler include search path
Resulting sc.ini should look something like this:
Code: | [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 |
10. Add "import win32.api" to your source files to use it and link with win32.lib |
|