Welcome, Guest. Please login or register.

Author Topic: Linker issues when making BOOPSI gadget  (Read 3859 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline MinuousTopic starter

Linker issues when making BOOPSI gadget
« on: March 19, 2012, 11:22:14 PM »
Hello all,

I'm in the process of developing a piechart.gadget for ReAction. The only example code I have found is the led.image code from the Developer CD. I'm trying to adapt that code but it doesn't seem to want to link correctly with SAS/C.

In the piechart.c file, there is a prototype:

VOID CallCHook(void);

and it is referred to later on this line:

cl->cl_Dispatcher.h_Entry = (HOOKFUNC) CallCHook;

In classinit.asm, I have:

    XDEF @CallCHook

and later in that file:

@CallCHook:
    ...code here...

and I am linking like this:

slink FROM classinit.o piechart.o endcode.o LIBRARY LIB:amiga.lib LIB:debug.lib TO piechart.gadget

but SLink refuses to link it, saying that _CallCHook is undefined. I don't know why. I don't know the significance of the prepended @ and _, it is not explained anywhere what these mean. I have tried changing, removing etc. these prepended symbols but it seems not to help.
 

Offline MinuousTopic starter

Re: Linker issues when making BOOPSI gadget
« Reply #1 on: March 20, 2012, 05:15:21 AM »
Yes, the assembler in use is the SAS/C assembler.
  Hmm, yes that is linking OK now. I thought I had tried that already, apparently not. Thanks.