Installing PCL
First of all, read the disclaimer.
After unpacking PCL.zip in a subdirectory of your choice, you should
have a five files (libPilotCL.a, PilotCL.prc, Talt270f.bin, tver270e.bin and
README) and three directories (include, doc, samples).
See the README for some hints on the examples.
In your makefile set C_INCLUDE_PATH and CPLUS_INCLUDE_PATH to something
containing the new 'include' directory, better yet, set them as environment
variables (see below for problems with make)!
Call the linker either with the full path and filename of libPilot.a or
add a '-L<your_PCL_directory>'
and
'-lPilotCL'
to your CFLAGS for
the link step. Take a look at the sample makefiles for this.
The next thing is, to include the resources in your executable.
There are two ways to accomplish this:
-
Either copy (or create a symbolic link to) the *.bin files in the
PCL directory to your application directory (sorry, build-prc doesn't
want full filenames), then let build-prc include them in your .prc file.
Again, see the sample makefiles for details how to do this (look for
all occurences of 'LIB_RES').
-
If you don't want to include the resources in your own .prc, you can
distribute the 'PilotCL.prc' with your application and have the user
install this small application. It contains all the needed resources and
will also be used to control
dynamic settings of the PCL in the future (such as memory allocation).
The problem I encountered using GNU 'make' under Linux and NT is,
that it doesn't export variables to child processes (even if you define
the .EXPORT_ALL_VARIABLES:
pseudotarget). So you either
have to copy the include files into a directory known by the compiler
(you can find this out by doing a
'm68k-palmos-coff-gcc -v <some_c++_file>') or you
set the environment variables 'C_INCLUDE_PATH' and 'CPLUS_INCLUDE_PATH'
globally.