Library Building Guide
Requirements
In order to build OpenPTC for Windows you need a copy of Visual C++ 6.0. You cannot
build the library with any other compilers, even though you can use the library from
several compilers, only Visual C++ 6.0 is supported for actually building the library.
Also, please note that "ptc.dll", "ptcdebug.dll" and
"hermes.dll" are distributed prebuilt with OpenPTC for Windows. You do not have
to build the library yourself in order to use OpenPTC. In fact, if you build your own
library, you will most likely have to leave out a lot of cool features such as java
support, so it is not recommended.
1. Configure Java support
- Java support allows java apps to call out to ptc.dll to get a large speed and
functionality boost.
- If you want JNI (Java Native Interface) support then you will need to have JDK 1.1 or
greater installed and configure Visual C++ to have the JDK /include directory in the
include file search path (tools/options directories tab).
- If you want RNI (Raw Native Interface) support then you must have the Microsoft Java SDK
installed and configure Visual C++ to search its include directory for include files.
- To disable java support, comment out the following defines in
"source/config.h": "__PTC_JNI__" and "__PTC_RNI__".
- You will also need to modify the "source/Dynamic/Dynamic.def" file to remove
all of the "_Java_ptc_jni_*", "ptc_rni_*" and
"RNIGetCompatableVersion" symbols from the exports section if you disable java
support or the link will fail.
2. Build "ptc.dll" and "ptcdebug.dll"
- Open the workspace "Source.dsw" in the "Source" directory.
- Go to the build menu and select "Batch Build".
- In the dialog that pops up, check both debug and release configurations of
"Dynamic" then press the "Build" button.
3. Build "hermes.dll"
- If you want to build your own "hermes.dll" you will need to download HERMES
from http://hermes.terminal.at and follow the
build instructions included.