[fpc-devel] fpc libraries do not work in freeBSD...

Fred van Stappen fiens at hotmail.com
Tue Aug 5 10:59:33 CEST 2014


Hello everybody.

 I have posted this question in fpc-mailing list but... no answers, so i try here...

Fpc libraries compiled on freeBSD 64 bit are unusable. (32 bit not tested)
Python, Java, C and even fpc applications can not use them in freeBSD...

Look at that  (works on Linux 32/64):  =>

>> The fpc library: =>

library test ;
{$mode objfpc}

procedure fpctest(); cdecl;
begin
writeln('OK, it works...');
end;

exports
fpctest name 'fpctest';

begin
end.____________________________________

>> The Python script: =>

#file fp_test.py
import string
import os,sys,platform
dia = sys.path[0]
from ctypes import*
fp_lib = "libtest.so"
fppathdll = os.path.join( dia , fp_lib)
fpdll = cdll.LoadLibrary(fppathdll)
fpdll.fpctest
_____________________________

Compile test.pas and run the python script: =>

>> python fp_test.py

=> Does not work and same error if fpc library is used by Python, 
Java (fpc lib compiled with Java-syntax), C or fpc applications:

> ~/libtest.so: Undefined symbol
> "operatingsystem_parameter_envp"

How can i help to fix that ?

Thanks.

Fred. 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20140805/bb130112/attachment.html>


More information about the fpc-devel mailing list