Howdy, Andrew!

> Many many thanks for that, you are being incredibly helpful!

Thanks!  Can you tell customer service is my dayjob? ;-)

> I will give this some real attention tomorrow (UK wind down time now) -
> but one quick question - do I need any specific "glib" files to make this
> all work??

The "glib" startup code is built into the palmos GCC development tools.  If 
you hunt around in the library directories for GCC you'll find some .a files, 
I believe.  This "stub" code is then included in the .a file for your 
library, and is in turn included by any application using the library.

This stub code checks for the presence of the GLib on the device, opens it, 
and sets up a relocation table.  It also satisfys GCC's need for valid 
function references.  I'm not sure, but with a little work it should be 
possible to use GLibs with CodeWarrior - but with the advent of the new 
developer suite, CodeWarrior is becoming a little less important in the grand 
scheme of things.

After typing 'make', and before typing 'make clean' (which removes excess 
temporary files, while leaving the .a and .prc), you'll find 
MyFontLib-jumps.s and MyFontLib-stubs.c (and corresponding .o files).  
Examine these.

These files are the core functionality of GLibs!  Note that the -stubs file is 
basically another representation of the .def file - in the GLib_myFL function 
is the assembly used to map each function in the library to the function /in/ 
the library (by number, which is why order is important in the .def file), 
the name of the library, the actual code to call each function, and code to 
arrange global access for the GLib.

The -jumps file is the actual function/relocation table, which is mashed when 
the library is loaded for use in the application.  (I think - someone correct 
me if I'm wrong.)

Note that you may have difficulty compiling the font library if you don't have 
exactly the right version of pilrc... I just removed the fontfamily 
definitions from the RCP to get it to compile, but it won't run that way.

Have a great day,
 Matthew Bevan

-- 
Matthew Bevan, Margin Software
 - Re-inventing the wheel, every time.

Finagle's Eighth Law:
        If an experiment works, something has gone wrong.

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to