GadTools Linker Errors

ArtEffect, AmigaWriter, StormC
Antworten
DonaldWM
Beiträge: 2
Registriert: 5. Dez 2003 16:00

GadTools Linker Errors

Beitrag von DonaldWM » 7. Dez 2003 15:28

Hello,

If I try to compile and link a GadTools program to a PPC target using the GCC compiler in StormC4, the linker will always fail.
I use the 'StormGCC603' library and also the 'Amiga603' library to link.
I do have a PPC Amiga which works fine.
The error is always the same, regardless of what program I try to compile:

Linker error: Symbol "_LayoutMenus" not defined (Hint: "_gadtoolsWindow__Fv").
objects/Window.o Symbol _LayoutMenus hunk 0 offset 0xb8c
Hint: _gadtoolsWindow__Fv

I do include the header files which define the function 'LayoutMenus'. I even tried copying the definition into the file where it is called from in
my code but the error persisted. This does not happen when compiled for 68K.

If I try the StormC3 compiler in StormC4, using the 'Storm603' library and also the 'Amiga603' library to link, I get the above error plus two more:

Linker error: Symbol "_CleanupModules" not defined (Hint: "").
StormC:StormSYS/startups/startup603.o Symbol _CleanupModules hunk 12 offset 0xbe

Linker error: Symbol "_InitModules" not defined (Hint: "").
StormC:StormSYS/startups/startup603.o Symbol _InitModules hunk 12 offset 0x82

Any ideas what is going on?

Donald

trgse
Beiträge: 2
Registriert: 8. Dez 2003 15:09

Re: GadTools Linker Errors

Beitrag von trgse » 8. Dez 2003 15:11

DonaldWM hat geschrieben:Hello,

Linker error: Symbol "_LayoutMenus" not defined (Hint: "_gadtoolsWindow__Fv").
objects/Window.o Symbol _LayoutMenus hunk 0 offset 0xb8c
Hint: _gadtoolsWindow__Fv

I do include the header files which define the function 'LayoutMenus'. I even tried copying the definition into the file where it is called from in
my code but the error persisted. This does not happen when compiled for 68K.
the ppc version of amiga.lib (amiga603.lib) does not seem to contain the wrappers for some functions...

replace LayoutMenus with LayoutMenusA() and set up the tags accordingly.

DonaldWM
Beiträge: 2
Registriert: 5. Dez 2003 16:00

Re: GadTools Linker Errors

Beitrag von DonaldWM » 9. Dez 2003 13:32

Thanks, the program now links successfully.

Unfortunately, more problems have now become apparent as the program now crashes if you try to interact with the GUI. It is perfectly stable and usable if compiled and linked for 68K, but crashes with Exception 8 if compiled and linked for PPC.

As an example, in 68k, if you click the CloseGadget then the program closes, but if you do the same on PPC, StormC reports it stopped at a Breakpoint, even though debugging is switched off!

To me this suggests that the problem is not my code but rather something StormC is doing.

Does StormC have known problems with GadTools when using PPC rather than 68k?

Donald

trgse
Beiträge: 2
Registriert: 8. Dez 2003 15:09

Re: GadTools Linker Errors

Beitrag von trgse » 15. Dez 2003 13:27

DonaldWM hat geschrieben:Thanks, the program now links successfully.
Does StormC have known problems with GadTools when using PPC rather than 68k?
Donald
not that I know of... but it probably is more picky... if you are using Gadtools/Boopsi you shouldn't use GetMsg for instance (GetIMsg IIRC).

then comes a couple of other things... are you sharing the IDCMP port, check the compiler flags etc. make sure you aren't using some 68k trick to some stuff.

Thomas
Beiträge: 5
Registriert: 20. Mai 2003 15:16

Beitrag von Thomas » 9. Jan 2004 17:17

To write a PPC program there is more to do than just to compile the 68k source code. For example if you use callback hooks: gadtools.library, which still is 68k, assumes 68k hook routines. So if you compile your program for PPC you have to add a small 68k routine that context-switches into your PPC hook routine.

BTW there is not much sense in writing a GUI program for PPC. Context switches will slow down things like hell. Especially the mentioned hooks. You will be able to watch your listview refresh everytime you interact with it.

Bye,
Thomas

Antworten

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 2 Gäste