[SOLVED] Where does these kind of errors come from? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- egsuh · 2020-12-19 07:24 I'm trying to compile CGIWebSession demo, but errors as in the attached file appear at Linking stage. What would be possible reason? ---------------------------------------------------------------------- trev · 2020-12-19 07:29 Your attachment is zero bytes ---------------------------------------------------------------------- egsuh · 2020-12-19 07:49 Sorry. I attached wrong file. ---------------------------------------------------------------------- egsuh · 2020-12-19 08:43 The errors are gone when I commented out SQLDBLaz from uses clause of program file. They are not declared in the units eigher. 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 program cgisession; {$mode objfpc}{$H+} uses  lresources,lazweb,fpWeb,fpCGI, wmsession, sqldbsession{, SQLDBLaz}; begin   Application.Title:='Session Support Demo';   Application.LegacyRouting:= True;  Application.Initialize;  Application.CreateForm(TSessionModule,SessionModule);  Application.Run;end. ---------------------------------------------------------------------- MarkMLl · 2020-12-19 11:19 Without knowing the details of what you're trying to do, I can see that WSRegisterMenuItem etc. are defined in lcl/aliases... what project are you trying to compile and where did you get it? MarkMLl ---------------------------------------------------------------------- egsuh · 2020-12-20 00:33 Quotewhat project are you trying to compile and where did you get it? This is a sample file from following page. There is a title named web2, and I downloaded the source. https://www.freepascal.org/~michael/articles/ ---------------------------------------------------------------------- MarkMLl · 2020-12-20 08:43 That's a rather old example, and it might be better treated as a /conceptual/ example rather than something that will still go through the compiler. I'm particularly bothered about the way that it appears to being in interface stuff from the LCL for some reason. Noting that the other example doesn't import SQLDBLaz, what happens if you try that one? MarkMLl ---------------------------------------------------------------------- PascalDragon · 2020-12-20 11:02 Quote from: egsuh on December 19, 2020, 09:43:40 amThe errors are gone when I commented out SQLDBLaz from uses clause of program file. They are not declared in the units eigher. SQLDBLaz is the package unit of the SQLDBLaz package which allows you to use the SQLDB components in the form designer. It's marked as a runtime and design time package as such you should not add its package unit to your program as it will pull in parts of the IDE as well and thus in turn pull in parts of the LCL. ---------------------------------------------------------------------- MarkMLl · 2020-12-20 15:04 Quote from: PascalDragon on December 20, 2020, 12:02:38 pmyou should not add its package unit to your program as it will pull in parts of the IDE as well and thus in turn pull in parts of the LCL. In fairness, he was using the example as downloaded and my very rapid scan over the paper didn't throw light on what was going on... after finding where those symbols were declared I was expecting it to be some form of IDE addon. MarkMLl ---------------------------------------------------------------------- egsuh · 2020-12-21 03:02 By removing SQLDBLaz, I can run it successfully (it was originally in the example). Probably the errors happened becuase SQLDBLaz tried to register components to the Lazarus IDE. I just use the sqldbsession unit. I'm looking for methods to overwrite its initsession and initresponse procedures using helpers to fit for my purposes.