Mingeborg@aol.com wrote:
I have tried using the unit / uses syntax, (specifying that each unit “uses” this environment module,) but I still cannot get these units linked. The compiler is complaining about several hundreds of “undefined references”I am now assuming that it is expecting the “imported” modules to contain the code for all of the procs/funcs called by each unit, rather than just the “external” definition. Is this correct, or might I be misunderstanding what is happening? (I am currently running gpc-20040516, gcc-3.3.3, on Suse Linux. I had previously run some tests using the last Gnu Pascal release system running on cygwin.)
I am hoping to avoid having to analyze dependencies and completely re-organize the modules. Is there any other way?
I don't know if you've already got an answer, so here's mine:
Could you send a detailed error message from the compiler? It's especially interesting which references remain unresolved.
My guess is that you are using some of the GPC standard units, and that you didn't add the according linking statements to the command line. For example, if you're compiling a source that "uses Crt", your command line will have to look like this:
gpc foo.pas -o foo -lncurses -lpanel
... since crt.pas is based upon the shared libraries libncurses and libpanel.
Regards,
Markus