Seite 1 von 1

GadTools Linker Errors

Verfasst: 7. Dez 2003 15:28
von DonaldWM
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

Re: GadTools Linker Errors

Verfasst: 8. Dez 2003 15:11
von trgse
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.

Re: GadTools Linker Errors

Verfasst: 9. Dez 2003 13:32
von DonaldWM
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

Re: GadTools Linker Errors

Verfasst: 15. Dez 2003 13:27
von trgse
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.

Verfasst: 9. Jan 2004 17:17
von Thomas
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