Next: 4.5 Library header location Up: 4. Wrapping Objective-C Libraries Previous: 4.3 Specifying the main

4.4 Library header name

JIGS automatically parses your library headers to determine the exact method declarations of the methods you want to expose.

You need to specify a single header file for your library which includes all the header files for your library. JIGS tries to determine it in the following way: it takes the JAVA_WRAPPER_NAME, and adds .h to it.

For example, if the GNUmakefile for your java wrapper is the following:

include $(GNUSTEP_MAKEFILES)/common.make

JAVA_WRAPPER_NAME = Game

include $(GNUSTEP_MAKEFILES)/java-wrapper.make
Then your library name is libGame. The header file JIGS will try to parse by default is Game.h. This header file should include all the header files which might be need to compile code against your library.

Often, you want to set explicitly the header file name. You can do that simply by setting the

XXX_HEADER_FILES
variable (where XXX is to be replaced with your JAVA_WRAPPER_NAME). For example, when wrapping the gnustep-base library, we have in the GNUmakefile
include $(GNUSTEP_MAKEFILES)/common.make

JAVA_WRAPPER_NAME = gnustep-base
gnustep-base_HEADER_FILES = Foundation/Foundation.h

include $(GNUSTEP_MAKEFILES)/java-wrapper.make
Please note that it should be a single header; you can't use multiple headers, despite the variable is called HEADER_FILES. The header file name should be in the full form you use for including it into C source code, such as in Foundation/Foundation.h. It must be in this form because it will end up in an Objective-C source file.


Next: 4.5 Library header location Up: 4. Wrapping Objective-C Libraries Previous: 4.3 Specifying the main
Nicola Pero 2001-07-24