Board index » delphi » Building UDF Lib for IB601 with Kylix + IBX65
Hilbrich, Rober
![]() Delphi Developer |
Sat, 14 Aug 2004 22:54:03 GMT
|
Hilbrich, Rober
![]() Delphi Developer |
Sat, 14 Aug 2004 22:54:03 GMT
Building UDF Lib for IB601 with Kylix + IBX65
Hi,
sorry that I post my Kylix question here, but there is no IBX-Kylix I Have Problems when building UDF in Kylix 2 Ent. + IBX65, dealing with I tried to use "isc_decode_date" / "isc_decode_sql_date" as it was described Has anybody got a piece of code for me that _works_? My code just works find, when dealing with integers or doubles ... but Thanks ... Robert Hilbrich |
Craig Stunt
![]() Delphi Developer |
Sun, 15 Aug 2004 00:30:53 GMT
Re:Building UDF Lib for IB601 with Kylix + IBX65In article <a5g7ii$1rg$0...@news.t-online.com>, hilbr...@cpc4u.de says... Quote
http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=17065 Should work well in both Delphi and Kylix. HTH, -Craig -- |
Hilbrich, Rober
![]() Delphi Developer |
Sun, 15 Aug 2004 17:44:47 GMT
Re:Building UDF Lib for IB601 with Kylix + IBX65Quote> http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=17065 Our Linux (SuSE 7.2) Interbase Server with Kylix 2 Ent. trial + IBX (from When I comment the line "isc_..." out everything is normal - no crash - it My next try was to use a windows ibase server (same edition as above) on I would like to use the server on __Linux__ and compile the UDFs in Kylix. I would appreciate any help you can give me ... Robert Hilbrich |
Craig Stunt
![]() Delphi Developer |
Sun, 15 Aug 2004 22:56:47 GMT
Re:Building UDF Lib for IB601 with Kylix + IBX65In article <a5i9r4$2u6$0...@news.t-online.com>, hilbr...@cpc4u.de says... Quote
the CheckIBLoaded call in the initialization section does this. Calling a nil function will AV and crash the IB server. Quote> When I comment the line "isc_..." out everything is normal - no crash - it depending upon whether the function isc_decode_sql_date is Assigned. (Don't call the function, just check to see if it's assigned.) I don't have a Linux box right now or I'd try it myself. HTH, -Craig -- |
Hilbrich, Rober
![]() Delphi Developer |
Sun, 15 Aug 2004 23:30:28 GMT
Re:Building UDF Lib for IB601 with Kylix + IBX65Quote> I don't have a Linux box right now or I'd try it myself. |
Hilbrich, Rober
![]() Delphi Developer |
Sun, 15 Aug 2004 23:30:00 GMT
Re:Building UDF Lib for IB601 with Kylix + IBX65Quote> Here's an experiment: Change your UDF to return a different value ... (if I remember right ...) function fn_test (var ib_date : TISC_date) : Integer; cdecl; I know this seems to be nonsense. But it crashes, when I remove the Best Regards ... Robert |
Craig Stunt
![]() Delphi Developer |
Mon, 16 Aug 2004 03:47:59 GMT
Re:Building UDF Lib for IB601 with Kylix + IBX65In article <a5iu2b$kkt$0...@news.t-online.com>, hilbr...@cpc4u.de says... Quote
Result := 1; end else begin Result := 0; Quote> end; -- |
Hilbrich, Rober
![]() Delphi Developer |
Mon, 16 Aug 2004 17:14:27 GMT
Re:Building UDF Lib for IB601 with Kylix + IBX65Ok, I started new from the beginning: 1) I downloaded RPM version of Interbase 6.0.1. from borland-open-source-site --> rpm -i ... OK 2) I downloaded Kylix Trial V.2 Build 6.42 from borland --> installing ... OK 3) I downloaded IBX 6.01 from borland / kylix - Page --> installing dclip... OK 4) I coded the following project in Kylix: //DPR-file uses begin //vertrag.pas interface uses IBExternals, IBHeader, IBIntf; function Fn_Test (var ib_date: ISC_DATE) : Integer; cdecl; exports Fn_Test, Fn_Test2; implementation function Fn_Test (var ib_date: ISC_DATE) : Integer; function Fn_Test2 (var ib_date: ISC_DATE) : Integer; initialization // 5) I compiled it ... OK, copied libSGM.so to /opt/interbase/UDF DECLARE EXTERNAL FUNCTION FN_TEST DECLARE EXTERNAL FUNCTION FN_TEST2 COMMIT; 8) I stopped IBase (ibmgr -shut -p masterkey) and restarted the server SELECT FN_TEST(CURRENT_DATE) from rdb$database; So well, I hope I can help with it, to find the error in IBX/IB. Thanks for your help ... Robert Hilbrich |
Craig Stunt
![]() Delphi Developer |
Mon, 16 Aug 2004 23:20:40 GMT
Re:Building UDF Lib for IB601 with Kylix + IBX65 OK, I'm really starting to scratch my head here. Try grabbing http://www.cvalde.com/misc/packages_and_utilities.htm ...and building it with GCC. Do those routines work for you? -Craig -- |
Hilbrich, Rober
![]() Delphi Developer |
Mon, 16 Aug 2004 23:44:38 GMT
Re:Building UDF Lib for IB601 with Kylix + IBX65Quote
Quote> Try grabbing Robert |
Hilbrich, Rober
![]() Delphi Developer |
Tue, 17 Aug 2004 00:04:37 GMT
Re:Building UDF Lib for IB601 with Kylix + IBX65I tried and failed ... Downloading ... OK But it Build the FreeLibC-File; Declaring external functions (isql /sgm_db/sgm.gdb -i ib_declarations.sql) So well ... doesn't seem to work though. As I said, I installed Borland's Robert |
Craig Stunt
![]() Delphi Developer |
Tue, 17 Aug 2004 02:25:29 GMT
Re:Building UDF Lib for IB601 with Kylix + IBX65In article <a5lkfa$8ji$0...@news.t-online.com>, hilbr...@cpc4u.de says... Quote> I tried and failed ... It's only needed when allocating memory to be used in conjunction with FREE_IT UDF declarations, which the date functions don't have. Generally, this technique is used only for strings/Blobs. My suggestion would be to pull out just one of these routines into Quote> But it Build the FreeLibC-File; Quote
6.0.1.6 for other reasons when possible. HTH, -Craig -- |
Robert Hilbric
![]() Delphi Developer |
Sat, 21 Aug 2004 01:12:23 GMT
Re:Building UDF Lib for IB601 with Kylix + IBX65Hi, now we tried to build some date-routines on our own - and it worked. We built a YEAR() routine which accepts a date-parameter and returns the year as int by value. IT REALLY WORKED ... So what the hell (sorry) is it in IBX that makes our server stuck??? Quote> Probably because it wants ib_util_malloc. Then I downloaded IB 602 from mers (site is very slow, isn't it?) and installed the tar-file to /opt. ... OK Now working with the win32 console is fine, but using the local isql gives me the error message: "inconsistent table lock version number; 114 expected 14" (if i remember right...) I tried to search at mers but the site is down or overstressed. Robert |
Craig Stunt
![]() Delphi Developer |
Sat, 21 Aug 2004 02:24:43 GMT
Re:Building UDF Lib for IB601 with Kylix + IBX65In article <a609tb$8d0$0...@news.t-online.com>, hilbr...@cpc4u.de says... Quote> now we tried to build some date-routines on our own - and it worked. Quote> How can I help u find the bug? Quote> I deinstalled IB601 (rpm -e InterBaseSS...)... OK http://mers.com Quote> Then I downloaded IB 602 from mers (site is very slow, isn't it?) and http://community.borland.com/article/0,1410,25429,00.html -Craig -- |
Robert Hilbric
![]() Delphi Developer |
Sat, 21 Aug 2004 06:16:50 GMT
Re:Building UDF Lib for IB601 with Kylix + IBX65Quote> Do you think it's IBX or the IB API? They aren't the same thing. api-function (isc_decode_date). IBX, I think is a layer above the IB Api using the api routines such as isc_decode_date. So when I directly call routines from the api in an UDF written in c without any help of ibx and everything is fine ... then I think IBX is "guilty". Quote
Quote> > Then I downloaded IB 602 from mers (site is very slow, isn't it?) and But: 1) The footer says it applies to IB56 and lower ... 2) there is no program gds_drop that i could call in my bin directory ... 3) rebooting didn't help as well ... I think it's out of date ... Thanks for your time ... Robert PS: Thought about your linux-box?? ;) |