# 5 Creating DLLs under Windows

`oztool` works under Windows as described in Chapter 4. In addition `oztool` can be directed to call different compilers and linkers to create object files and DLLs. This is done by specifying one of the following options to `oztool` (`-gnu` is the default):

- `-gnu`: use mingw32 or cygwin (i. e., egcs)

- `-msvc`: use Microsoft Visual C++ 5.0/6.0

- `-watcom`: use Watcom 10.x

You can use the option `-verbose` to let `oztool` print out the commands it executes. This will also give you an idea of what steps to perform if you want to use another compiler than those mentioned in the above list.

## 5.1 Known Bugs and Problems

1. When creating DLLs with cygwin, make sure that `cygwin.dll` is correctly initialized. The document README.jni.txt might give some more help under `"Cygwin notes"`.

2. It is not possible to link to a C run-time library other than `msvcrt.dll`.

3. Because of incompatible name-mangling schemes of different C++ compilers, a library making use of the foreign function interface's C++ classes must be compiled with GNU C++ to link correctly.