Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2001-01

newbie problem with format function - Linux

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tomas Michalík

Hi,

I am completely new to FPC, so I may miss something obvious ... I am trying to write UDF function for InterBase on Linux (RH6.2), which is based on standard Pascal Format function. I have already done this for IB for Win in Delphi with no problem. I have found out that FPC contains many units I recognize from Delphi so I thought it shouldn't cause serious troubles. Unfortunately this is not the case. Are the following functions from SYSUTILS unit supposed to work : Format, StrFmt ? When I use those, the library compiles but doesn't work and I have to kill IB client.

P.S.
I based my work on free UDF from Frank Schlottmann-Goedde. The original UDF library compiles and works OK so I don't think it is caused by wrong compiler settings ...
I have FPC 1.0.2 installed.

Thanks a lot for any useful input,
Tom

=================================

Tomas Michalik
ProCA, s. r. o.
V Luzich 818, Praha 4
Czech Republic

e-mail:
tel: +420 2 67283446

Sebastian Günther
to Tomas Michalík
Tomas Michalík wrote 5 lines
Are the following functions from SYSUTILS unit supposed to work : Format, StrFmt ? When I use those, the library compiles but doesn't work and I have to kill IB client.

normally they work, but there is a serious problem: You write a library with FPC, which gets loaded by InterBase. But on Linux, when IB loads your FPC library, the linked-in FPC RTL doesn't get initialized, so most RTL functions don't work properly.
AFAIK it isn't possible to write libraries with FPC now, which will be used by non-FPC applications; but perhaps Peter or Florian can comment on the latest progress regarding library initialization on Linux...? (especially as I'll use InterBase for myself, too ;) )

I based my work on free UDF from Frank Schlottmann-Goedde. The original UDF library compiles and works OK so I don't think it is caused by wrong compiler settings ...

when the library init problems are fixed one day, we should try to integrate these UDF units into fpc/packages/ibase...

- Sebastian