[fpc-pascal] Problem with dynamic libraries

Adrian Veith adrian at veith-system.de
Wed Jun 13 20:00:35 CEST 2007


Hi,

i have written a dll (pasForNeko) in delphi / windows which can be 
called from the haxe/neko language, in order to use existing object 
pascal code from this language. now I try to port this to fpc and linux 
and run into some problems:

1. I can't compile even the simplest library from fpc (i use 2.1.4) in linux

library testdll; 

uses
  SysUtils,
  Classes;

procedure HalloWelt;
begin
end;

exports
  HalloWelt;
 
begin
end.

causes an: Error  while linking
in linux when compiled with

fpc testdll.pas

in windows it works with fpc

2. the delphi/windows version of the pasForNeko works fine. the same 
code compiled with fpc in windows fails to run with an exception.

Are there known pitfalls when compiling dlls in fpc which are called 
from applications written in C ?


Thanx,

Adrian.







More information about the fpc-pascal mailing list