Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Vlastite UDF funkcije u lazarusu

[es] :: Firebird/Interbase :: Vlastite UDF funkcije u lazarusu

[ Pregleda: 3549 | Odgovora: 0 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

MarkoBalkan

Član broj: 141124
Poruke: 1624
178.160.109.*



+19 Profil

icon Vlastite UDF funkcije u lazarusu29.07.2011. u 19:48 - pre 154 meseci
OS je fedora 32 bitna, firebird 2.1.4

radio sam po ovom primjeru:

http://www.ibphoenix.com/resources/documents/search/doc_304


project

Code:

library Project1;

{$mode objfpc}{$H+}

uses
  Classes;


{$R *.res}


begin

end.
    exports Modulo;



unit1

Code:


unit Unit1; 

{$mode objfpc}{$H+}

interface
   function Modulo(var i, j: Integer): Integer; cdecl; export;

uses
  Classes, SysUtils; 

implementation

function Modulo(var i, j: Integer): Integer;
begin
  if (j = 0) then
    result := -1 // just check the boundary condition, and
                 // return a reasonably uninteresting answer.
  else
    result := i mod j;
end;

end.






ddl

Code:


DECLARE EXTERNAL FUNCTION F_MODULO
Integer, Integer
RETURNS Integer BY VALUE 
ENTRY_POINT 'Modulo'
MODULE_NAME 'libproject1';





kod poziva funkcije mi javi ovu grešku:

Starting transaction...
Preparing query: select f_Modulo(3, 2) from rdb$database

Error: *** IBPP::SQLException ***
Context: Statement::Prepare( select f_Modulo(3, 2) from rdb$database
)
Message: isc_dsql_prepare failed

SQL Message : -104
Invalid token

Engine Code : 335544343
Engine Message :
invalid request BLR at offset 60
function F_MODULO is not defined
module name or entrypoint could not be found


Total execution time: 0,070s
 
Odgovor na temu

[es] :: Firebird/Interbase :: Vlastite UDF funkcije u lazarusu

[ Pregleda: 3549 | Odgovora: 0 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.