Recent

Author Topic: Making DLL with Lazarus on Linux  (Read 4874 times)

justnewbie

  • Sr. Member
  • ****
  • Posts: 292
Making DLL with Lazarus on Linux
« on: March 16, 2018, 12:24:35 pm »
I need to make a 32 bit DLL.
So far I tried to run the Lazarus (win32 version) on my Linux system by using Wine. Unfortunately it is buggy this way.
So, I need to run the Linux version of Lazarus.
Is it possible to make a DLL file by using my Linux version of Lazarus (cross compiling)?
If yes, please explain the details.
« Last Edit: March 16, 2018, 12:26:46 pm by justnewbie »

Thaddy

  • Hero Member
  • *****
  • Posts: 14205
  • Probably until I exterminate Putin.
Re: Making DLL with Lazarus on Linux
« Reply #1 on: March 16, 2018, 12:30:37 pm »
On linux we do not know dll's, the are called .so's. Or do you mean you want to cross compile to Windows?
You are in deep trouble anyway, because you do not use a native linux version or a native windows version.
But if you explain exactly what you want I can give examples.
Specialize a type, not a var.

justnewbie

  • Sr. Member
  • ****
  • Posts: 292
Re: Making DLL with Lazarus on Linux
« Reply #2 on: March 16, 2018, 12:44:41 pm »
Thank you. Yes, I know what is DLL/SO. I need a 32bit DLL for a 32bit Windows application.
I have a Linux 64bit system. In VirtualBox I installed a 32bit Linux system, and as I mentioned, tried to run the 32bit Windows version of Lazarus on it via Wine (I don't want to use Windows at all).
Unfortunately, Lazarus (Windows version) doesn't work well via Wine, it is buggy, useless.
So, I want to use the Linux version of Lazarus (on my Linux system).
But, I need to make a DLL (not SO) with this "Linux environment" (cross compiling?).
Is it possible? If yes, how?

UPDATE: I found this (Leledumbo's answer) https://forum.lazarus.freepascal.org/index.php?topic=12111.0, but not so clear for me. Can I get any help about it?
« Last Edit: March 16, 2018, 01:18:12 pm by justnewbie »

justnewbie

  • Sr. Member
  • ****
  • Posts: 292
Re: Making DLL with Lazarus on Linux
« Reply #3 on: March 18, 2018, 11:19:05 am »
Hi, any help?  :)

balazsszekely

  • Guest
Re: Making DLL with Lazarus on Linux
« Reply #4 on: March 18, 2018, 12:01:05 pm »
Did you try Fpcupdeluxe( http://forum.lazarus.freepascal.org/index.php/topic,34645.0.html )? It will install a separate Lazarus/FPC instance, which will not interfere with you current installation. With Fpcupdeluxe you can also install cross-compilers for various system. In my opinion it's the easiest way to achieve cross-compiling.

justnewbie

  • Sr. Member
  • ****
  • Posts: 292
Re: Making DLL with Lazarus on Linux
« Reply #5 on: March 18, 2018, 02:46:24 pm »
I did not know fpcupdeluxe, tried to install it but got this error:
fpcupdeluxe: ERROR: UniversalInstaller (ConfigModule: suggestedpackages): Failure trying to rebuild Lazarus.

Maybe someone could help me based on this https://forum.lazarus.freepascal.org/index.php/topic,12111.0.html?

justnewbie

  • Sr. Member
  • ****
  • Posts: 292
Re: Making DLL with Lazarus on Linux
« Reply #6 on: March 18, 2018, 03:50:07 pm »
I tried Leledumbo's solution https://forum.lazarus.freepascal.org/index.php/topic,12111.0.html.
The "make" was OK, but when a I made the "Build", got this (see picture).
How can I solve it?

Thaddy

  • Hero Member
  • *****
  • Posts: 14205
  • Probably until I exterminate Putin.
Re: Making DLL with Lazarus on Linux
« Reply #7 on: March 18, 2018, 04:27:37 pm »
You do not have the sourcecode installed. For cross-compilation you need the sourcecode. (At the minimum, but from linux to windows this will work.)
Subsequently you can build the packages and the rtl for windows first with FPC *before* you build Lazarus.
« Last Edit: March 18, 2018, 04:32:49 pm by Thaddy »
Specialize a type, not a var.

justnewbie

  • Sr. Member
  • ****
  • Posts: 292
Re: Making DLL with Lazarus on Linux
« Reply #8 on: March 18, 2018, 04:36:38 pm »
Sorry, I don't understand this. When I installed the Lazarus, I used all the 3 install files (fpc, fpc-source and Lazarus). So, I think the source code is installed.
Can you give me a step-by-step instruction, what I have to do?

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

justnewbie

  • Sr. Member
  • ****
  • Posts: 292
Re: Making DLL with Lazarus on Linux
« Reply #10 on: March 19, 2018, 03:38:09 pm »
Thank you. I tried the first link, I think I did everything well, but during build I got error.
It is too difficult for "just a newbie".

 

TinyPortal © 2005-2018