Greetings, I have some statistical programs that I would like to release under GPL. They were originally written in Borland Pascal and Speed Pascal (the latter is a borland-like pascal for OS/2), and all the code compiles and runs fine using those two compilers. Now I am trying to get everything to compile and run under gpc, so that the code will be useful to more people. It looks like I'll have a lot of questions along the way, and I'd appreciate any help that can be provided. I'm using a version of gpc that I installed as a binary from the file gpc-19990118_i386-pc-emx0_9d.zip I can compile and run little test programs that use no units, or that use only type definitions from units, but I get "undefined symbol" messages if the main program refers to any variables or procedures defined in the interface part of the unit. Here is a small example, adapted from one posted recently. The file def.pas has the following unit: UNIT modul; INTERFACE TYPE CARDINAL = 0..65535; LONGBITSET = SET OF 0..63; Var ModS : Integer; PROCEDURE HELLO; IMPLEMENTATION PROCEDURE HELLO; BEGIN WRITELN('HELLO'); END; END. The file test.pas has this test program. program test; USES modul; var i:CARDINAL; c:LONGBITSET; begin ModS := 0; Hello; c:=[1]; i:=1; if (i in c) then writeln('yes'); end. gpc -c def.pas works fine, but gpc test.pas yields the messages d:\tcpip\tmp\ccc00799: Undefined symbol _Mods referenced from text segment d:\tcpip\tmp\ccc00799: Undefined symbol _Hello referenced from text segment d:\tcpip\tmp is my temp directory, and I noticed that running gpc leaves a lot lot of small files called cca000*.exe in the temp directory. Can anyone tell me what I'm doing wrong? Thank you for your time, Jeff Miller Dept of Psychology University of Otago Dunedin, New Zealand miller@otago.ac.nz http://psy.otago.ac.nz/miller
participants (2)
-
Khimenko Victor -
miller@otago.ac.nz