4
4
<html xmlns="http://www.w3.org/1999/xhtml">
5
5
<!-- XML file produced from file: manual.tex
6
6
using Hyperlatex v 2.6 (c) Otfried Cheong
7
on Emacs 21.3.1, Mon Nov 22 10:30:52 2004 -->
7
on Emacs 21.3.1, Tue Sep 26 20:03:47 2006 -->
9
9
<title>Ipe Manual -- 9 Writing ipelets</title>
73
73
<h4><a name="id1">Compiling ipelets on Windows</a></h4>
74
74
The ipelet must be compiled as a DLL and must be linked with the Ipe
75
library "libipe.lib". C++ mandates that it must be compiled with
76
the same compiler that was used to compile Ipe. If you use the binary
77
Ipe distribution for Windows, that means you have to use the free
78
Borland C++ compiler. (Its command-line version is available as a
79
download after registering on the <a href="http://www.borland.com">Borland
80
webpage</a>, the same compiler is also in Borland
81
C++ builder.) The Ipe Windows distribution contains the necessary
82
header files and the library to compile ipelets, as well as the source
83
of the "kgon" and "goodies" ipelets as examples. You can compile
84
the "kgon" example as follows:
75
library "ipe.dll". C++ mandates that it must be compiled with the
76
same compiler that was used to compile Ipe. If you use the binary Ipe
77
distribution for Windows, that means you have to use the MinGW
78
compiler. (If you haven't used it before: MinGW is a port of g++ for
79
Windows). Using g++ under Cygwin may also work with the
80
<code>-mno-cygwin</code> option (it didn't always work for me--please let
81
me know if you find out why).
82
<p>The Ipe Windows distribution contains the necessary header files and
83
the library to compile ipelets, as well as the source of the "kgon"
84
and "goodies" ipelets as examples. To compile the "kgon" example,
85
open a command shell, make sure MinGW g++ is on your path, and say:
86
bcc32 -WD -tWR -DWIN32 -Iinclude kgon.cpp lib/libipe.lib
87
g++ -c -O2 -DWIN32 -fno-exceptions -fno-rtti -Iinclude kgon.cpp
88
g++ -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import \
89
-Wl,-enable-runtime-pseudo-reloc -Wl,-s -shared -o kgon.dll kgon.o \
88
92
Place the resulting <i>kgon.dll</i> in the <i>ipelets</i>
89
93
subdirectory, and restart Ipe.