Delphi: Support for Lazarus
The components can be used from Lazarus on Windows.
Date Entered: 12/28/2010 Last Updated: 08/24/2012
PrerequisitesWindows: To use the components in Windows you need only install the Delphi edition of the toolkit.
Linux/Mac: In Linux and Mac you will need to copy the .pas files from a Delphi edition installation on a Windows machine.
You must also install the C++ Unix/Linux Edition of the toolkit on the non-windows machine. Navigate to the "src" folder of the installation and run the command:
sudo make installIt is important the libraries are installed to the /usr/lib directory so Lazarus can find them at runtime.
- From the Project -> Project Options dialog, select the Compiler Options -> Paths section and enter the path to the "pas" folder of the /n software .pas files in the Other Unit Files textbox.
This is the only required step for Windows.
- In Linux and Mac, you must also modify the linker options necessary for the C++ Unix/Linux edition. To do this, in the Project -> Project Options dialog select the Compiler Options -> Linking section and in the Options section specify:
-lz -lresolv -lssl -lcryptoBe sure to check the "Pass Options To The Link" checkbox as well.
In the source code for your project modify the uses statement to include the core, keys, and component pas files for the product and component you're using. For instance:
uses ipwcore, ipwkeys, ipwhttp ...The names used in the uses statement correspond to the .pas files in the "pas" folder of the installation for the product. Below is an example of source code from a Lazarus project using the HTTP component from the IPWorks toolkit.
uses Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, ipwcore, ipwkeys, ipwhttp; ... procedure TForm1.Button1Click(Sender: TObject); var MyHTTP: TipwHTTP; //Declare an instance of the component begin MyHTTP := TipwHTTP.Create(self); //Create the instance of the component MyHTTP.Get('http://www.google.com'); ...
We appreciate your feedback. If you have any questions, comments, or suggestions about this entry please contact our support team at email@example.com.