calling c code from pascal

Miguel Pérez E miguel.perez at primestone.com
Thu Aug 2 23:59:04 CEST 2001


Hello, sorry if this is a trivial question.

I´d like to use dzcomm library in my pascal program. It is necesary to first initialize allegro:

///****************************************//
program Terminal;

{$L c:\djgpp\allegro\src\allegro.c}

function allegro_init() : integer; asmname 'allegro_init'; external;

begin
   allegro_init();
   Writeln('Hola, esta es una prueba.');
   readln;
end.
///****************************************//

but the gpc says:

C:\DJGPP\allegro\dzcomm\term>gpc term2.pas --autobuild
term2.pas:5: parse error before `)'
term2.pas: In main program:
term2.pas:8: parse error before `)'
term2.pas:8: warning: function call as a statement - value is ignored

What I am doing wrong?, or what switches do I have to set?

Thank you for your help.


Miguel Pérez E
Development Engineer
Primestone
E-Mail: miguel.perez at primestone.com
Tel:      (571) 6265432
Fax:     (571) 6156377

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.g-n-u.de/pipermail/gpc/attachments/20010802/a0b04f97/attachment.htm>


More information about the Gpc mailing list