[comp.sys.atari.st] need help: lattice c gem access

UD138985@NDSUVM1.BITNET (09/03/87)

I have been trying to use some simple Lattice C GEM ruotines.  Everything
compiles fine, but when I try to link, all of my GEM calls turn up as
undefined symbols.  I am linking with the C.LNK file that came with the
package with the line for the GEM library uncommented.  In the linker
map fille it lists all of the symbols it takes out of the other libraries
and the name GEMLIB.BIN but the symbols are still undefined.  I get a .PRG
file after the link, but it doesn't run.  HELP!  I have sent a letter to
Metacomcos tech support along with my registration number but have not
received a response for quite a while.  Can someone who has been successful
with linking to GEM libraries please tell me what to do???
     
     
     
           thanks for any replies in advance,
     
               Bob

ins_bjjb@jhunix.UUCP (09/06/87)

In article <285UD138985@NDSUVM1> UD138985@NDSUVM1.BITNET writes:
>I have been trying to use some simple Lattice C GEM ruotines.  Everything
>compiles fine, but when I try to link, all of my GEM calls turn up as
>undefined symbols.  I am linking with the C.LNK file that came with the
>package with the line for the GEM library uncommented.  In the linker
>map fille it lists all of the symbols it takes out of the other libraries
>and the name GEMLIB.BIN but the symbols are still undefined.  I get a .PRG
>file after the link, but it doesn't run.  HELP!  I have sent a letter to
>Metacomcos tech support along with my registration number but have not
>received a response for quite a while.  Can someone who has been successful
>with linking to GEM libraries please tell me what to do???
>               Bob

   While not actually having tried using the GEM libraries at all, I did
find GEMLIB.H mentioned in the Lattice C manual (v.3.03.04) as being
"useful" in programs using GEM calls.

--
Jared J. Brennan
BITNET: INS_BJJB@JHUVMS, INS_BJJB@JHUNIX
ARPA: ins_bjjb%jhunix@hopkins.ARPA
UUCP: {allegra!hopkins, seismo!umcp-cs, ihnp4!whuxcc} !jhunix!ins_bjjb
Love is a dog from Hell.

waynekn@tekig5.TEK.COM (Wayne Knapp) (09/07/87)

In article <285UD138985@NDSUVM1> UD138985@NDSUVM1.BITNET writes:
#I have been trying to use some simple Lattice C GEM ruotines.  Everything
#compiles fine, but when I try to link, all of my GEM calls turn up as
#undefined symbols.  I am linking with the C.LNK file that came with the
#package with the line for the GEM library uncommented.  In the linker
#map fille it lists all of the symbols it takes out of the other libraries
#and the name GEMLIB.BIN but the symbols are still undefined.  I get a .PRG
#file after the link, but it doesn't run.  HELP!  I have sent a letter to
#Metacomcos tech support along with my registration number but have not
#received a response for quite a while.  Can someone who has been successful
#with linking to GEM libraries please tell me what to do???
#               Bob

I spent about 10 hours figuring this one out.  The problem is that you are
compiling with the -n options that allows routine names greater than 8 
characters in lenght.  All of the names in GEMLIB.BIN are 8 characters long.

So there are two solutions to this problem.  One is to allow use the first
8 characters of any GEM call.  Another solutions which I've been using is to
redefine the GEM calls.  I have a include file called GEMDEF.H that looks
something like the following:

#define APPL_INIT    appl_ini
#define FORM_ALERT   form_ale  
       etc.

Anyway I hope this helps.

                         Wayne Knapp     

rh@cs.paisley.ac.uk (Robert Hamilton) (09/09/87)

In article <5238@jhunix.UUCP> ins_bjjb@jhunix.UUCP (Jared J Brennan) writes:
>In article <285UD138985@NDSUVM1> UD138985@NDSUVM1.BITNET writes:
>>I have been trying to use some simple Lattice C GEM ruotines.  Everything
>>compiles fine, but when I try to link, all of my GEM calls turn up as
>>undefined symbols.  I am linking with the C.LNK file that came with the

This is an annoying feature in lattice if you dont know about it.
In the pre 3.4 lattice the gem library was compiled with the 8 character
symbol limit so "appl_init" is "appl_ini" .
This is ok unless you use the -n option in your own progs. So don't use
the -n option
In 3.4 If I remember things are reversed so "appl_init" really is "appl_init"
and you have to use use the -n  option.

I wrote to the net a while back about the new lattice linker bombing out.
I've seen no replies. Have I just been unlucky?

-- 
JANET:  rh@uk.ac.paisley.cs		| Computing Science
EMAIL:	rh@cs.paisley.ac.uk		| Paisley College
UUCP:	...!seismo!mcvax!ukc!paisley!rh	| High St., Paisley
Phone:	+44 41 887 1241 Ext. 219	| Scotland , PA12BE