-
Notifications
You must be signed in to change notification settings - Fork 2
Using on Windows
Orfeo Da Via edited this page Apr 14, 2016
·
2 revisions
In order to compile Windows projects with harud, you need:
- Dynamic library
libhpdf.dll
- Import library
libhpdf.lib
- D Binding
harud.lib
Directory lib
of harud contains all precomplide libraries.
You can download a pre-compiled build for 2.3.0RC2 version here.
The Basic Utilities Package from Digital
Mars (http://digitalmars.com/download/freecompiler.html) contains
the implib
tool that creates import library from dll:
implib /s libhpdf.lib libhpdf.dll
You can download harud from here.
$ dub build
In your dub file you should add references at import libraries.
For example:
{
"name": "hello",
"description": "Simple example with harud",
"libs-posix": ["hpdf"],
"sourcePaths": ["."],
"sourcePaths-windows": ["../../lib/"],
"sourceFiles-windows": ["../../lib/libhpdf.lib"],
"dependencies": {
"harud": ">=0.1.0"
}
}
sourcePaths-windows
refers to directory that contains libhpdf.lib
and sourceFiles-windows
refers directly to libhpdf.lib
.
Furthermore you should copy libhpdf.dll
in same directory of executable.
Pass the libhpdf.lib
file to dmd when compiling your program:
dmd app.d ../harud/bin/harud.lib ../harud/lib/libhpdf.lib -I../harud/src -ofbin/hello.exe