On 7 Nov 2002 at 19:38, Markus Gerwinski wrote:
J. David Bryan wrote:
The second command line doesn't include "foo.o", so the linker has no way to resolve "Bar". Try:
gcc footest.c foo.o -o footest
Thanks. There's still something wrong...
My apologies. "gcc" doesn't know about the Pascal run-time library, which is needed to resolve the externals you listed. You can either tell "gcc" about the Pascal library:
gcc footest.c foo.o -o footest -lgpc
...although that depends on "gcc" being able to find "libgpc.a" in its default search paths, or you can have "gpc" run the linker ("gpc" already knows about the Pascal library):
gcc -c footest.c gpc foo.pas footest.o -o footest
-- Dave