HomeUser GuideDevelopmentDownloadLegal

Development: dll

Description

Task to build a windows dynamic link library for use with JNI using MinGW.

As Simple As Possible...

This task is simple and straightforward. It supports only the creation of JNI compliant libraries from a single C-Source. That should however suffice for most JNI helper libraries. After all we're programming Java, aren't we...

Parameters

This task supports the following parameters.

Attribute Description Required
mingwdir Installation location of MinGW.
Note: The C-Compiler is searched as ${mingwdir}/bin/gcc.exe.
Yes.
source The source C-File to compile. Yes.
output The output DLL to create. Yes.

Nested Elements

This task supports the following nested elements.

includedir

Used to specify a directory containing header files to include.

Attribute Description Required
path Path of the include directory. Yes.

depends

Used to specify a single file dependency.

The task only starts the compiler if the source is newer than the output DLL. However if you use include files you will have to add them manually as a dependency (as in good old "make" times).

Attribute Description Required
path Path of the dependent file. Yes.

Examples

<dll mingwdir="c:\mingw" source="mydll.c" output="mydll.dll">
  <depends path="mydll.h"/>
  <includedir path="include"/>
  <includedir path="include/win32"/>
<dll>