LCL without Lazarus lazarus / 31-LCL ---------------------------------------------------------------------- OneHitWonder · 2020-05-03 17:17 Hello all, First of all I'd like to just point out that I am new to Pascal and Lazarus and have only been using it for a couple of days now. I am coming from a Java background mainly for Android development. A lot of tutorials on Pascal seem to involve Lazarus quiet heavily. To the point where I think a beginner would find it difficult to differentiate the two. That said I have focused mainly on trying to learn Pascal without the Lazarus IDE and work more with the FPC. I want to create a basic Window / Form without using Lazarus. I managed to locate this wiki page https://wiki.lazarus.freepascal.org/Using_the_LCL_without_Lazarus but it feels incomplete or I am missing something. I am trying to compile my program using 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 fpc -Fu/usr/lib/lazarus/1.8.2/units/x86_64-linux/gtk2 test.pas but I am getting a compiler error regarding the Forms unit cannot be found. What am I missing? Thank you. ---------------------------------------------------------------------- skalogryz · 2020-05-03 17:32 I'd think you also need to add this path to your -Fu options Code: [Select]/usr/lib/lazarus/1.8.2/units/x86_64-linux LCL comes in two parts: cross-platform part (which Forms unit in your case) and platform part (aka widgetset) which you're already looking at by specifying "gtk2" What IDE are you using? (it might be the biggest downside of not using Lazarus is you might be missing the visual editor. But... it might not be a big deal) ---------------------------------------------------------------------- m.abudrais · 2020-05-03 17:50 you need to add  many units path to compile lcl app. you can see the argument which lazrus send to fpc and modify it. open lazarus and create LCL app, then from the menu project->project option press show option. this is mine 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 C:\lazarus\fpc\3.0.4\bin\x86_64-win64\fpc.exe-MObjFPC-Scghi-O1-g-gl- WG-l-vewnhibq-FiC:\Users\moh\AppData\Local\Temp\lib\x86_64-win64- FuC:\lazarus\lcl\units\x86_64-win64\win32- FuC:\lazarus\lcl\units\x86_64-win64- FuC:\lazarus\components\lazutils\lib\x86_64-win64- FuC:\lazarus\packager\units\x86_64-win64-Fu.- FUC:\Users\moh\AppData\Local\Temp\lib\x86_64-win64\- FEC:\Users\moh\AppData\Local\Temp\- oC:\Users\moh\AppData\Local\Temp\project1.exe-dLCL-dLCLwin32 ---------------------------------------------------------------------- OneHitWonder · 2020-05-03 19:00 Quote from: skalogryz on May 03, 2020, 07:32:25 pmWhat IDE are you using? (it might be the biggest downside of not using Lazarus is you might be missing the visual editor. But... it might not be a big deal) I am currently using VIM but I will be using Lazarus once I understand a little more how things work. Quote from: m.abudrais on May 03, 2020, 07:50:08 pmyou need to add  many units path to compile lcl app. you can see the argument which lazrus send to fpc and modify it. open lazarus and create LCL app, then from the menu project->project option press show option. this is mine 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 C:\lazarus\fpc\3.0.4\bin\x86_64-win64\fpc.exe-MObjFPC-Scghi-O1-g-gl- WG-l-vewnhibq-FiC:\Users\moh\AppData\Local\Temp\lib\x86_64-win64- FuC:\lazarus\lcl\units\x86_64-win64\win32- FuC:\lazarus\lcl\units\x86_64-win64- FuC:\lazarus\components\lazutils\lib\x86_64-win64- FuC:\lazarus\packager\units\x86_64-win64-Fu.- FUC:\Users\moh\AppData\Local\Temp\lib\x86_64-win64\- FEC:\Users\moh\AppData\Local\Temp\- oC:\Users\moh\AppData\Local\Temp\project1.exe-dLCL-dLCLwin32  Thank you, this was a good place to start, I managed to narrow it down to the following: 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 fpc -MObjFPC -Fu/usr/lib/lazarus/1.8.2/lcl/units/x86_64-linux/gtk2 -Fu/usr/lib/lazarus/1.8.2/lcl/units/x86_64-linux -Fu/usr/lib/lazarus/1.8.2/components/lazutils/lib/x86_64-linux test.pas ---------------------------------------------------------------------- OneHitWonder · 2020-05-03 20:23 So it compiles just fine now but I am having some issues linking. Anyone got any ideas how to resolve these? 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 /usr/lib/lazarus/1.8.2/lcl/units/x86_64-linux/wsimglist.o: In function `REGISTERCUSTOMIMAGELIST':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsimglist.pp:262: undefined reference to `WSRegisterCustomImageList'/usr/lib/lazarus/1.8.2/lcl/uni ts/x86_64-linux/wsmenus.o: In function `REGISTERMENUITEM':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsmenus.pp:221: undefined reference to `WSRegisterMenuItem'/usr/lib/lazarus/1.8.2/lcl/units/x86_ 64-linux/wsmenus.o: In function `REGISTERMENU':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsmenus.pp:232: undefined reference to `WSRegisterMenu'/usr/lib/lazarus/1.8.2/lcl/units/x86_64- linux/wsmenus.o: In function `REGISTERMAINMENU':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsmenus.pp:243: undefined reference to `WSRegisterMainMenu'/usr/lib/lazarus/1.8.2/lcl/units/x86_ 64-linux/wsmenus.o: In function `REGISTERPOPUPMENU':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsmenus.pp:254: undefined reference to `WSRegisterPopupMenu'/usr/lib/lazarus/1.8.2/lcl/units/x86 _64-linux/wscontrols.o: In function `REGISTERDRAGIMAGELIST':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wscontrols.pp:442: undefined reference to `WSRegisterDragImageList'/usr/lib/lazarus/1.8.2/lcl/units /x86_64-linux/wscontrols.o: In function `REGISTERLAZACCESSIBLEOBJECT':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wscontrols.pp:452: undefined reference to `WSRegisterLazAccessibleObject'/usr/lib/lazarus/1.8.2/lcl /units/x86_64-linux/wscontrols.o: In function `REGISTERCONTROL':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wscontrols.pp:462: undefined reference to `WSRegisterControl'/usr/lib/lazarus/1.8.2/lcl/units/x86_6 4-linux/wscontrols.o: In function `REGISTERWINCONTROL':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wscontrols.pp:472: undefined reference to `WSRegisterWinControl'/usr/lib/lazarus/1.8.2/lcl/units/x8 6_64-linux/wscontrols.o: In function `REGISTERGRAPHICCONTROL':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wscontrols.pp:482: undefined reference to `WSRegisterGraphicControl'/usr/lib/lazarus/1.8.2/lcl/unit s/x86_64-linux/wscontrols.o: In function `REGISTERCUSTOMCONTROL':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wscontrols.pp:493: undefined reference to `WSRegisterCustomControl'/usr/lib/lazarus/1.8.2/lcl/units /x86_64-linux/wsforms.o: In function `REGISTERSCROLLINGWINCONTROL':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsforms.pp:264: undefined reference to `WSRegisterScrollingWinControl'/usr/lib/lazarus/1.8.2/lcl /units/x86_64-linux/wsforms.o: In function `REGISTERSCROLLBOX':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsforms.pp:275: undefined reference to `WSRegisterScrollBox'/usr/lib/lazarus/1.8.2/lcl/units/x86 _64-linux/wsforms.o: In function `REGISTERCUSTOMFRAME':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsforms.pp:286: undefined reference to `WSRegisterCustomFrame'/usr/lib/lazarus/1.8.2/lcl/units/x 86_64-linux/wsforms.o: In function `REGISTERCUSTOMFORM':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsforms.pp:297: undefined reference to `WSRegisterCustomForm'/usr/lib/lazarus/1.8.2/lcl/units/x8 6_64-linux/wsforms.o: In function `REGISTERHINTWINDOW':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsforms.pp:308: undefined reference to `WSRegisterHintWindow'/usr/lib/lazarus/1.8.2/lcl/units/x8 6_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMSCROLLBAR':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsstdctrls.pp:734: undefined reference to `WSRegisterCustomScrollBar'/usr/lib/lazarus/1.8.2/lcl/uni ts/x86_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMGROUPBOX':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsstdctrls.pp:745: undefined reference to `WSRegisterCustomGroupBox'/usr/lib/lazarus/1.8.2/lcl/unit s/x86_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMCOMBOBOX':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsstdctrls.pp:756: undefined reference to `WSRegisterCustomComboBox'/usr/lib/lazarus/1.8.2/lcl/unit s/x86_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMLISTBOX':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsstdctrls.pp:767: undefined reference to `WSRegisterCustomListBox'/usr/lib/lazarus/1.8.2/lcl/units /x86_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMEDIT':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsstdctrls.pp:778: undefined reference to `WSRegisterCustomEdit'/usr/lib/lazarus/1.8.2/lcl/units/x8 6_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMMEMO':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsstdctrls.pp:789: undefined reference to `WSRegisterCustomMemo'/usr/lib/lazarus/1.8.2/lcl/units/x8 6_64-linux/wsstdctrls.o: In function `REGISTERBUTTONCONTROL':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsstdctrls.pp:805: undefined reference to `WSRegisterButtonControl'/usr/lib/lazarus/1.8.2/lcl/units /x86_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMBUTTON':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsstdctrls.pp:819: undefined reference to `WSRegisterCustomButton'/usr/lib/lazarus/1.8.2/lcl/units/ x86_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMCHECKBOX':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsstdctrls.pp:830: undefined reference to `WSRegisterCustomCheckBox'/usr/lib/lazarus/1.8.2/lcl/unit s/x86_64-linux/wsstdctrls.o: In function `REGISTERTOGGLEBOX':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsstdctrls.pp:843: undefined reference to `WSRegisterToggleBox'/usr/lib/lazarus/1.8.2/lcl/units/x86 _64-linux/wsstdctrls.o: In function `REGISTERRADIOBUTTON':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsstdctrls.pp:854: undefined reference to `WSRegisterRadioButton'/usr/lib/lazarus/1.8.2/lcl/units/x 86_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMSTATICTEXT':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsstdctrls.pp:867: undefined reference to `WSRegisterCustomStaticText'/usr/lib/lazarus/1.8.2/lcl/un its/x86_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMLABEL':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsstdctrls.pp:878: undefined reference to `WSRegisterCustomLabel'/usr/lib/lazarus/1.8.2/lcl/units/x 86_64-linux/wsbuttons.o: In function `REGISTERCUSTOMBITBTN':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsbuttons.pp:107: undefined reference to `WSRegisterCustomBitBtn'/usr/lib/lazarus/1.8.2/lcl/units/ x86_64-linux/wsbuttons.o: In function `REGISTERCUSTOMSPEEDBUTTON':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsbuttons.pp:119: undefined reference to `WSRegisterCustomSpeedButton'/usr/lib/lazarus/1.8.2/lcl/u nits/x86_64-linux/wsextctrls.o: In function `REGISTERSHAPE':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsextctrls.pp:232: undefined reference to `WSRegisterShape'/usr/lib/lazarus/1.8.2/lcl/units/x86_64- linux/wsextctrls.o: In function `REGISTERCUSTOMSPLITTER':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsextctrls.pp:243: undefined reference to `WSRegisterCustomSplitter'/usr/lib/lazarus/1.8.2/lcl/unit s/x86_64-linux/wsextctrls.o: In function `REGISTERPAINTBOX':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsextctrls.pp:254: undefined reference to `WSRegisterPaintBox'/usr/lib/lazarus/1.8.2/lcl/units/x86_ 64-linux/wsextctrls.o: In function `REGISTERCUSTOMIMAGE':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsextctrls.pp:265: undefined reference to `WSRegisterCustomImage'/usr/lib/lazarus/1.8.2/lcl/units/x 86_64-linux/wsextctrls.o: In function `REGISTERBEVEL':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsextctrls.pp:276: undefined reference to `WSRegisterBevel'/usr/lib/lazarus/1.8.2/lcl/units/x86_64- linux/wsextctrls.o: In function `REGISTERCUSTOMRADIOGROUP':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsextctrls.pp:287: undefined reference to `WSRegisterCustomRadioGroup'/usr/lib/lazarus/1.8.2/lcl/un its/x86_64-linux/wsextctrls.o: In function `REGISTERCUSTOMCHECKGROUP':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsextctrls.pp:298: undefined reference to `WSRegisterCustomCheckGroup'/usr/lib/lazarus/1.8.2/lcl/un its/x86_64-linux/wsextctrls.o: In function `REGISTERCUSTOMLABELEDEDIT':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsextctrls.pp:309: undefined reference to `WSRegisterCustomLabeledEdit'/usr/lib/lazarus/1.8.2/lcl/u nits/x86_64-linux/wsextctrls.o: In function `REGISTERCUSTOMPANEL':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsextctrls.pp:320: undefined reference to `WSRegisterCustomPanel'/usr/lib/lazarus/1.8.2/lcl/units/x 86_64-linux/wsextctrls.o: In function `REGISTERCUSTOMTRAYICON':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsextctrls.pp:337: undefined reference to `WSRegisterCustomTrayIcon'/usr/lib/lazarus/1.8.2/lcl/unit s/x86_64-linux/wsdialogs.o: In function `REGISTERCOMMONDIALOG':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsdialogs.pp:141: undefined reference to `WSRegisterCommonDialog'/usr/lib/lazarus/1.8.2/lcl/units/ x86_64-linux/wsdialogs.o: In function `REGISTERFILEDIALOG':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsdialogs.pp:152: undefined reference to `WSRegisterFileDialog'/usr/lib/lazarus/1.8.2/lcl/units/x8 6_64-linux/wsdialogs.o: In function `REGISTEROPENDIALOG':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsdialogs.pp:163: undefined reference to `WSRegisterOpenDialog'/usr/lib/lazarus/1.8.2/lcl/units/x8 6_64-linux/wsdialogs.o: In function `REGISTERSAVEDIALOG':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsdialogs.pp:174: undefined reference to `WSRegisterSaveDialog'/usr/lib/lazarus/1.8.2/lcl/units/x8 6_64-linux/wsdialogs.o: In function `REGISTERSELECTDIRECTORYDIALOG':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsdialogs.pp:185: undefined reference to `WSRegisterSelectDirectoryDialog'/usr/lib/lazarus/1.8.2/l cl/units/x86_64-linux/wsdialogs.o: In function `REGISTERCOLORDIALOG':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsdialogs.pp:196: undefined reference to `WSRegisterColorDialog'/usr/lib/lazarus/1.8.2/lcl/units/x 86_64-linux/wsdialogs.o: In function `REGISTERCOLORBUTTON':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsdialogs.pp:207: undefined reference to `WSRegisterColorButton'/usr/lib/lazarus/1.8.2/lcl/units/x 86_64-linux/wsdialogs.o: In function `REGISTERFONTDIALOG':/build/lazarus- Sur0jK/lazarus-1.8.2+dfsg/lcl//widgetset/wsdialogs.pp:218: undefined reference to `WSRegisterFontDialog'  Thanks ---------------------------------------------------------------------- m.abudrais · 2020-05-03 21:56 i don't know  your problem, but this command worked for in virtual box ubuntu 17 lazarus 1.6.4(very old  ) and fpc 3.02. ---------------------------------------------------------------------- skalogryz · 2020-05-03 22:35 Quote from: OneHitWonder on May 03, 2020, 10:23:02 pmSo it compiles just fine now but I am having some issues linking. Anyone got any ideas how to resolve these? make sure you're using "Interfaces" unit at least once in your program.