Dear All
I am trying to make use of gpc compiler(2.1 version) in solaris 2.8 platform.For testing purpose I have written two sample programs,one for creating a module and another is a program. program will call the function defined in the module. I am compiling those programs by make use of a make file.
When I am trying to call a function from library it is giving linking problem.Below I am pasting the code and make file.Please correct my code sothat it facilitates me to call the function from library and also please make the corrections if any in the make file. *************************************** program ModDemo3 (Output);
begin WriteLn ('program writeln'); xtra; end. *************************************** module DemoMod3;
procedure xtra ; begin writeln('from library'); end; end. ************************************** PC=gpc PFLAGS= -DSOLARIS -L/home/kvsspl VPATH = /home/kvsspl/
DemoMod3.o : DemoMod3.pas $(PC) -c $(PFLAGS) DemoMod3.pas
ModDemo3.o : ModDemo3.pas $(PC) -c $(PFLAGS) ModDemo3.pas
ModDemo3 : DemoMod3.o ModDemo3.o $(PC) -o ModDemo3 DemoMod3.o ModDemo3.o \ **********************************************************
Please treat it as urgent and help me
Regards Hari
__________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
You have no import / export instructions. minimum would be (interface/implementation combined in a single file)
program ModDemo3 (Output);
import DemoMod3;
begin WriteLn ('program writeln'); xtra; end.
module DemoMod3;
export DemoMod3 = all; procedure xtra; end; {interface }
procedure xtra ; begin writeln('from library'); end; end.
In message 20051017125359.53152.qmail@web50304.mail.yahoo.com, vanam srihari kumar v_sriharikumar@yahoo.com writes
I am trying to make use of gpc compiler(2.1 version) in solaris 2.8 platform.
You might want to consider upgrading to the latest alpha version (from http://www.gnu-pascal.de/alpha/)as I seem to recollect there have been a number of bug fixes for modules since 2.1