Closed alexalkis closed 2 years ago
please try to find such things yourself. Hints:
-s
-Wl,-M=outfile.map
to create a map filem68k-amigaos-objdump -Dr outfile
to search for the symbols In your case it's
type = type_of_typedef(Text, ctype);
which refers to the graphics function Text. It's not enough to define something extern:
extern_ char Text[TEXTLEN + 1]; // Last identifier scanned
The variable must be instantiated somewhere.
tip of the day: Don't use variables and functions starting with an uppercase to avoid overlap with AmigaOS stuff.
It's instantiated in main.
#include "defs.h"
#define extern_
#include "data.h"
#undef extern_
#include "decl.h"
#include <errno.h>
#include <unistd.h>
It's instantiated in main.
#include "defs.h" #define extern_ #include "data.h" #undef extern_ #include "decl.h" #include <errno.h> #include <unistd.h>
No, it isn't. You need some initialization. Only declared:
int x;
Instantiated:
int x = 0;
I thought globals are instantianted if declared, but I guess that conflicts with the global library trick that the amiga toolchains needs, huh?
Not initialized variables end up as common symbols. If a common symbol is not resolved it ends up in bss.
In this case it gets resolved since _Text
is defined in libamiga.a
which then requests GfxBase
.
Ok, thanks and sorry for the trouble :)
graphlib.zip
So, if you do
and you run the executables through vamos, you get:
Something triggers the inclusion of graphics.library which is not needed.