Iâm a (fairly) new Pascal user, and I am trying to help a friend port a Digital Pascal application to GNU. I am now looking at one of two âbig (?)â programs, which contains about 3000-4000 functions/procedures in about 40 modules.
Currently, this is organized as follows: There is one âenvironmentâ module (which every other module âinherits,â) containing type definitions, global variables, and a list of â[global]â functions and procedures, declared (here) as âexternalâ. All functions/procedures used in the set of modules are [global], and they are (or at least seem to be, at this point,) more or less randomly distributed over the 40 modules, (so that a proc/func from any module might be calling a proc/func contained in any other module.)
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?
Thanks for your help,
- Inga Matthews