[solved] IBX does not compile lazarus / 16-Databases ---------------------------------------------------------------------- Nicole · 2023-12-19 18:45 Lazarus 3 RC on Win 7 64 bit with Firebird 4 I tried to open my existing code, which runs fine in a different VM with the previous versions of Lazarus. On opening my project, - not very surprising - I read something like "IBX not found". I confirmed from within the project inspector "search online for it" and it was found. Unfortunately the IDE does not compile with it and I read the error- messages you see on the screenshot. My VM-snapshot is immediately before I confirmed the online attempt and a reset will happen quickly. What do you recommend best to get my code in function again? Or in other words: Which version, which way, which link will bring the best IBX to my VM? Thanks! PS after a period of time: I tried to download and update several versions and combinations until it worked finally. ---------------------------------------------------------------------- marcov · 2023-12-19 18:48 Do you have the latest (october) IBX? ---------------------------------------------------------------------- rvk · 2023-12-19 19:14 Quote from: Nicole on December 19, 2023, 07:45:44 pmI confirmed from within the project inspector "search online for it" and it was found. That will get you the version from Online Package Manger which seems to be outdated. (Tony already said as much but doesn't know how to update OPM.) Download the latest one from IBX site or svn. (Although with Lazarus trunk or RC you could get an error regarding a mismatch in an numerated type in which case you need to adjust that manually by adding some nil fields. At least that was the case for me last time I did this a few weeks ago.) ---------------------------------------------------------------------- Nicole · 2023-12-20 10:56 Thank you for the answers. The very recent version downloads just now. Why I preferred the online one: There was quite a long list of lpk-files and I was not sure, which to install and which not. The documentations overwhelmed me. ---------------------------------------------------------------------- rvk · 2023-12-20 11:07 Quote from: Nicole on December 20, 2023, 11:56:36 amThe documentations overwhelmed me. Actually... the documentation is really clear about that. QuoteInstallation into the Lazarus IDE is the same under both Linux and Windows. Unpack the source code archive into some suitable permanent location, as described above, and open the “dclibx.lpk” package description file using the “Package->Open Package File” menu item to open the file. When the Package Editor opens, click on “Use->Install”. Lazarus will now recompile itself and restart. THREE new tabs should now be present on the Component Palette: “Firebird”, “Firebird IBX for Lazarus User Guide Admin”, and “Firebird Data Controls”. Respectively, these contain the IBX Database Access and Service API components. A third tab on the palette will contain the “Firebird Data Controls”. So, just open dclibx.lpk, click Use and Install... and that's it. BTW. Version 2.6.3 installs without any problems on current trunk. (not tested the svn version from ibx yet) ---------------------------------------------------------------------- Nicole · 2023-12-20 19:15 Thank you for your reply. This worked. The very recent version is 2.6.3. Please do this: Open the ibdynamicgrid.pas go to line 199 change this line to Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TDBDynamicGrid.DrawCellText(aCol, aRow: Integer; aRect: TRect; aState: TGridDrawState; aText: String); and generally: Thank you for writing this genius component! I need it the most of all my programming-items. ---------------------------------------------------------------------- rvk · 2023-12-20 19:25 Mmm, I could install 2.6.3 on Lazarus trunk without any change today. ---------------------------------------------------------------------- Nicole · 2023-12-20 19:30 I was happy too early. My problems are here:   procedure DrawCellText(aCol,aRow: LongInt; aRect: TRect; aState: TGridDrawState; aText: AnsiString); override; and here procedure TCustomGrid.DrawCellText(aCol, aRow: Integer; aRect: TRect; aState: TGridDrawState; const aText: String); line 4740 The code is very puzzling to me and I loose orientation which is which. Sometimes I read "virtual", then "override" Then I am ask for changing Integer into LongInt and String to AnsiString. I give up for today. ---------------------------------------------------------------------- rvk · 2023-12-20 19:49 Quote from: Nicole on December 19, 2023, 07:45:44 pmLazarus 3 RC on What version of Lazarus are you using EXACTLY? Because RC 1 is already outdated. Trunk (latest development) works fine. There is also Lazarus 3 RC 2 already. Edit: And now (dec 21th) Lazarus 3 is out ---------------------------------------------------------------------- Nicole · 2023-12-21 16:52 I use the very recent, downloaded the RC 3 two days ago. Are you sure, the code is perfect? ---------------------------------------------------------------------- rvk · 2023-12-21 17:19 Quote from: Nicole on December 21, 2023, 05:52:14 pmI use the very recent, downloaded the RC 3 two days ago. Are you sure, the code is perfect? There was no RC 3 for Lazarus 3. Only RC 1 and RC 2. (and the fact you downloaded is two days ago does NOT say anything about the actual version you downloaded) I just tried the install procedure with the just released Lazarus 3.0 (final version) and ibx4lazarus2.6-3 just installed without any problems. So I'm not sure what exactly you are doing to get that error. ---------------------------------------------------------------------- Nicole · 2023-12-21 19:09 hm, hm... I think, I do the same with just the same versions and getting this errors you do NOT get. Let me check, if there is a previous VM snapshot and trash it all and retry? unsure Can Firebird make a difference? It it the very latest 4. Or Win 7? Should not be as well. Should be something with Laz and IBX. Can a setting anywhere make a difference? At the moment, I do not know, what to do. ---------------------------------------------------------------------- rvk · 2023-12-21 19:12 Quote from: Nicole on December 21, 2023, 08:09:26 pmCan Firebird make a difference? It it the very latest 4. Or Win 7? Should not be as well. Should be something with Laz and IBX. Can a setting anywhere make a difference? No, OS and Firebird version doesn't matter. It could be a setting. I installed with clean freshly installed Lazarus and unzipped ibx 2.6.3. So try it with a clean version. ---------------------------------------------------------------------- Nicole · 2023-12-21 19:27 I did this very moment, unfortunately with the same result, I post a screenshot. and: I did not change any setting. Just a clean installation on a VM only for Lazarus and Firbird. I am clueless! It looks alike all other overrides. ---------------------------------------------------------------------- rvk · 2023-12-21 19:31 What step are you doing to install ibx? And what package are you choosing? (Write down the exact steps) ---------------------------------------------------------------------- cdbc · 2023-12-21 21:04 Hi By any chance have you checked if you're in {$mode objfpc}{$H+}? IIRC this mode sets the "Integer" to "LongInt". The error clearly states"LongInt;LongInt,etc" and it's declared "Integer"...  Regards Benny ---------------------------------------------------------------------- rvk · 2023-12-21 21:12 I was under the impression the error happened during compilation of IBX itself (during install). If it's not then the problem is in your own code. Then don't go changing anything in the source code of IBX otherwise you het further from home. If the problem is in your own code, begin a new project and document where the problem occurs exactly. ---------------------------------------------------------------------- Nicole · 2023-12-22 10:57 My code should not be the problem. I have 2 VMs: One with my running code and one for the Lazarus 3 migration. The code is added by copy and paste. This means: It is tested on running together with IBX. The version of IBX is different. In my old VM is a previous version, in the new VM the very recent IBX. Let us find out more about this mode:  {$mode objfpc}{$H+}? Where can I set it? I fail at integrating IBX into the IDE, this is "on installing the lpk-file". I did not change anything of the defaults: Just generated a new Win 7 VM, installed firebird, Lazarus and then (not)  IBX. (just at the side: I used Flamerobin, the new version works fine, but even better is: FirebirdEditorPro64.7z) ---------------------------------------------------------------------- rvk · 2023-12-22 11:06 Quote from: Nicole on December 22, 2023, 11:57:43 amLet us find out more about this mode:  {$mode objfpc}{$H+}? Where can I set it? I fail at integrating IBX into the IDE, this is "on installing the lpk-file". You shouldn't change ANYTHING in the source code of IBX. The {$mode} remark was for your own code if you had the problem there with ansistring/string etc. But the code of IBX itself is correct and should work. You still didn't mention WHAT lpk file you use exactly. And you didn't mention the exact steps. I will list them here. *) Download and install Lazarus 3.0 (cleanly) *) Download and unzip  ibx4lazarus2.6-3 https://www.mwasoftware.co.uk/downloads/download/5-ibx- current/223-ibx4lazarus2-6-3 *) Open Lazarus and choose "Package" > "Open package file (lpk)" *) Choose and open the ibx4lazarus2.6-3/ibx/dclibx.lpk file *) Click "Use" > and "Install" *) Let Lazarus recompile itself After Lazarus restarts everything should be installed. Where in these steps do you get into trouble exactly. ---------------------------------------------------------------------- Nicole · 2023-12-22 16:42 The very last step. Lazarus does not compile because of the error message you see at the screenshot. And my code is not open. I just hit "project new" and so it is a "project 1" written by Lazarus. BUT! I rechecked, this is the "forbidden" thing, wasn't it? Where can I change it and what consequences may it have to my code? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1; {$mode ObjFPC}{$H+} interface uses  Classes, SysUtils; implementation end. ---------------------------------------------------------------------- rvk · 2023-12-22 16:48 Quote from: Nicole on December 22, 2023, 05:42:12 pmAnd my code is not open. I just hit "project new" and so it is a "project 1" written by Lazarus. I don't see where I said to hit "Project new"  You just start Lazarus empty and choose Packages and open the dclibx.lpk package and Use > Install. But if that doesn't work... I can't help you any further. It works for me with new Lazarus 3.0 and ibx4lazarus2.6-3 in a clean directory. ~~ You can do File > Close all. And then Choose Packages > Ope package > dclibx.lpk package and Use > Install. ---------------------------------------------------------------------- tonyw · 2023-12-22 16:58 Quote from: Nicole on December 20, 2023, 08:15:10 pmThank you for your reply. This worked. The very recent version is 2.6.3. Please do this: Open the ibdynamicgrid.pas go to line 199 change this line to Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TDBDynamicGrid.DrawCellText(aCol, aRow: Integer; aRect: TRect; aState: TGridDrawState; aText: String); and generally: Thank you for writing this genius component! I need it the most of all my programming-items. The above method's signature was changed in an early release candidate for laz 3 and then got changed back to the original. I did change IBX to first comply with the change and then again when the change got reversed out - a bit of a pain really. This means that you need to be careful about using older experimental versions of Lazarus and/or IBX as you may see this complation error if the versions don't line up. If you are going to use Lazarus 3 then please make sure that you also using the latest version of IBX. ---------------------------------------------------------------------- rvk · 2023-12-22 17:31 Quote from: tonyw on December 22, 2023, 05:58:25 pmThis means that you need to be careful about using older experimental versions of Lazarus and/or IBX as you may see this complation error if the versions don't line up. If you are going to use Lazarus 3 then please make sure that you also using the latest version of IBX. I already mentioned this several times but I can't seem to get a straight answer as to what version is used exactly. At least Lazarus 3 RC 2 and Lazarus 3.0 final are OK (I didn't feel the need to test RC 1 because it's old). ---------------------------------------------------------------------- tonyw · 2023-12-22 22:25 Quote from: rvk on December 22, 2023, 06:31:50 pmQuote from: tonyw on December 22, 2023, 05:58:25 pmThis means that you need to be careful about using older experimental versions of Lazarus and/or IBX as you may see this complation error if the versions don't line up. If you are going to use Lazarus 3 then please make sure that you also using the latest version of IBX. I already mentioned this several times but I can't seem to get a straight answer as to what version is used exactly. At least Lazarus 3 RC 2 and Lazarus 3.0 final are OK (I didn't feel the need to test RC 1 because it's old). The IBX changelog is your friend. The problematic change was introduced by IBX 2.5-1 29th July 2022 and for compatibility with the then Lazarus 2.3.0. It was reversed out in IBX 2.6-1 17th July 2023 See also https://gitlab.com/freepascal.org/lazarus/lazarus/- /commit/53aaae9c5e2a5edac5b1d2f70739a8ef7b0a9623 ---------------------------------------------------------------------- Nicole · 2023-12-23 12:53 Can you do this to me please? All those links, gits, hubs, threads, snapshots contains hundreds of links for downloading Lazarus-versions. In my mind, I GOT the very recent version of both, but may be, I did not. I will reset my VM and start all over again: Please give me ONE link for Lazarus 3 IBX I took from the first link here https://www.mwasoftware.co.uk/ibx Thanks. ---------------------------------------------------------------------- tonyw · 2023-12-23 12:57 Quote from: Nicole on December 23, 2023, 01:53:37 pmCan you do this to me please? All those links, gits, hubs, threads, snapshots contains hundreds of links for downloading Lazarus-versions. In my mind, I GOT the very recent version of both, but may be, I did not. I will reset my VM and start all over again: Please give me ONE link for Lazarus 3 IBX I took from the first link here https://www.mwasoftware.co.uk/ibx Thanks. You can get Lazarus 3 from https://www.lazarus- ide.org/index.php?page=downloads I suggest that you uninstall your current version and re-install with the download from the lazarus homepage. IBX: please make sure you are using 2.6-3, which can be downloaded from https://mwasoftware.co.uk/downloads/category/5-ibx-current