<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:monospace;font-size:large"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 17, 2023 at 10:07 AM Bo Berglund via lazarus <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, 17 Mar 2023 08:53:01 +0300, Mehmet Erol Sanliturk via lazarus<br>
<<a href="mailto:lazarus@lists.lazarus-ide.org" target="_blank">lazarus@lists.lazarus-ide.org</a>> wrote:<br>
<br>
>Some portability is obtained if the libraries are linked as "static" .<br>
>If "dynamic" linking is selected , during execution of the program ,<br>
>the "same" library should be in the executing computer .<br>
><br>
<br>
How is this accomplished in Lazarus?<br>
<br>
Does this change happen randomly or is it connected to the major Ubuntu releases<br>
like going from 20.04 to 22.04 rather than just keeping 20.04 up-to-date?<br>
<br>
It implies having to build applications on as old a system as ever possible,<br>
maybe using 16.04 or earlier just for making apps that can run on all systems,<br>
is that really true?<br>
<br>
It makes no sense to me...<br>
<br></blockquote><div><br></div><div><br></div><div><div style="font-family:monospace;font-size:large" class="gmail_default">Please study fpc.cfg file structure , and Lazarus IDE linking options .</div><div style="font-family:monospace;font-size:large" class="gmail_default">On my computer , neither FPC nor Lazarus are installed .</div><div style="font-family:monospace;font-size:large" class="gmail_default"><br></div><div style="font-family:monospace;font-size:large" class="gmail_default"><br></div><div style="font-family:monospace;font-size:large" class="gmail_default">There is an option to specify either dynamic linking or static linking of</div><div style="font-family:monospace;font-size:large" class="gmail_default">libraries .</div><div style="font-family:monospace;font-size:large" class="gmail_default"><br></div><div style="font-family:monospace;font-size:large" class="gmail_default">When static linking is selected , it is necessary to have static linkable libraries ( *.a )<br></div><div style="font-family:monospace;font-size:large" class="gmail_default">of used parts , i.e. , dynamic linkable libraries ( *.so.* ) can not be used for</div><div style="font-family:monospace;font-size:large" class="gmail_default">static linking .<br></div><br></div><div><br></div><div><a href="https://www.google.com/search?q=lazarus+static+linking+of+libraries&sxsrf=AJOqlzXTPuAEwc2JkAaon6mLwAvBM-kn5A%3A1679053415469&ei=Z1IUZL2NHP-Qxc8PqvqOuAM&ved=0ahUKEwj93Iyz8eL9AhV_SPEDHSq9AzcQ4dUDCA4&uact=5&oq=lazarus+static+linking+of+libraries&gs_lcp=Cgxnd3Mtd2l6LXNlcnAQAzIFCCEQoAE6BwgAEB4QsAM6BAgjECc6BggAEBYQHjoICAAQFhAeEAo6CAgAEBYQHhAPOgUIABCRAjoFCAAQgAQ6BwguEIAEEAo6BwgAEIAEEAo6CgguEIAEENQCEAo6CAgAEIAEEMsBOgsILhCABBDUAhDLAToICC4QgAQQywE6BQguEIAEOgsILhCABBDHARCvAToKCAAQgAQQFBCHAjoHCAAQDRCABDoICAAQBRAeEA06BAghEBU6BwghEKABEApKBAhBGAFQpBdYi8IBYIHJAWgDcAB4AIABxwGIAcYikgEEMC4zNpgBAKABAcgBAsABAQ&sclient=gws-wiz-serp">https://www.google.com/search?q=lazarus+static+linking+of+libraries&sxsrf=AJOqlzXTPuAEwc2JkAaon6mLwAvBM-kn5A%3A1679053415469&ei=Z1IUZL2NHP-Qxc8PqvqOuAM&ved=0ahUKEwj93Iyz8eL9AhV_SPEDHSq9AzcQ4dUDCA4&uact=5&oq=lazarus+static+linking+of+libraries&gs_lcp=Cgxnd3Mtd2l6LXNlcnAQAzIFCCEQoAE6BwgAEB4QsAM6BAgjECc6BggAEBYQHjoICAAQFhAeEAo6CAgAEBYQHhAPOgUIABCRAjoFCAAQgAQ6BwguEIAEEAo6BwgAEIAEEAo6CgguEIAEENQCEAo6CAgAEIAEEMsBOgsILhCABBDUAhDLAToICC4QgAQQywE6BQguEIAEOgsILhCABBDHARCvAToKCAAQgAQQFBCHAjoHCAAQDRCABDoICAAQBRAeEA06BAghEBU6BwghEKABEApKBAhBGAFQpBdYi8IBYIHJAWgDcAB4AIABxwGIAcYikgEEMC4zNpgBAKABAcgBAsABAQ&sclient=gws-wiz-serp</a></div><div><br></div><div>lazarus static linking of libraries</div><div><br></div><div><div style="font-family:monospace;font-size:large" class="gmail_default">Comparison of Linux and Windows is not a fruitful action , because they do not have much similarity</div><div style="font-family:monospace;font-size:large" class="gmail_default">other than being operating systems .</div><div style="font-family:monospace;font-size:large" class="gmail_default"><br></div><div style="font-family:monospace;font-size:large" class="gmail_default"><br></div><div style="font-family:monospace;font-size:large" class="gmail_default">Mehmet Erol Sanliturk</div><div style="font-family:monospace;font-size:large" class="gmail_default"><br></div><div style="font-family:monospace;font-size:large" class="gmail_default"></div><br></div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
And from <a href="https://wiki.freepascal.org/Lazarus/FPC_Libraries" rel="noreferrer" target="_blank">https://wiki.freepascal.org/Lazarus/FPC_Libraries</a><br>
------------------------------------------------------------------------------<br>
Static linking<br>
<br>
FPC compiles and links a static executable by default. That means it tells the<br>
linker to put all .o files of the project and all packages into one big<br>
executable.<br>
<br>
Advantages:<br>
No external dependencies.<br>
Disadvantages:<br>
No code is shared between different programs on the same computer.<br>
You can not load/unload a plugin.<br>
-------------------------------------------------------------------------------<br>
<br>
This idea was always why I liked Delphi when it came along in 1995 or so, just<br>
build an executable and it could be run everywhere.<br>
This is also why I liked FreePascal when it appeared because I did not need to<br>
bother with distributing extra files all over the place.<br>
<br>
So why has it changed now and how can I get around it?<br>
Developing on an up-to-date system should ensure the output could work<br>
everywhere, but not so now it appears....<br>
<br>
I cannot find any setting for this in Lazarus.<br>
<br>
Notice: This is a command line utility so it needs no access to any GUI<br>
components at all...<br>
<br>
<br>
-- <br>
Bo Berglund<br>
Developer in Sweden<br>
<br>
-- <br>
_______________________________________________<br>
lazarus mailing list<br>
<a href="mailto:lazarus@lists.lazarus-ide.org" target="_blank">lazarus@lists.lazarus-ide.org</a><br>
<a href="https://lists.lazarus-ide.org/listinfo/lazarus" rel="noreferrer" target="_blank">https://lists.lazarus-ide.org/listinfo/lazarus</a><br>
</blockquote></div></div>