Source Code Creating your .SO Linux 64bits library in Delphi environment

emailx45

Social Engineer
Joined
May 5, 2008
Messages
2,387
Reaction score
2,149
Creating your .SO Linux 64bits library in Delphi environment
[SHOWTOGROUPS=4,20]
If you need create yourself .SO library, try this:
  • Create a new project to Library DLL (MSWindows) in your IDE
  • Add the Linux 64bits platform to your project
  • code your unit to Linux!!! - if dont know Linux environment, hum.... you need study it!!! :(
  • Build all
NOTE: to compile projects in Linux 64bits (or other platform non-MSWindows), you need create a connection definition for this platform in your Project Manager, then:
  • have a Linux 64bits installed in a VM for example if you dont have a new pc with this O.S.
  • with 2 pcs (MSWindows and Linux) in the same network do the connection profile in your IDE
  • the IDE will go import the SDK Linux to your MSWindows pc
  • later, you can add new Linux 64bits platform to your project
  • if need, you can have install the FMXLinux in your RAD.
  • For more info, use your HELP SYSTEM to know how to access Linux platform in your IDE "Linux Application Development"
Pay attention on items:
  • 1 Prerequisites
  • 2 Preparing Your Linux Development Environment
    • 2.1 Installing Linux SDK
    • 2.2 Preparing Your Linux Machine
    • 2.3 Creating a Connection Profile
    • 2.4 Adding the Installed SDK to RAD Studio
    • 2.5 Running PAServer on Linux machine
  • 3 Developing Your Application
Last note:
  • you do not need, nor should you, enter binarys in your application.
  • You can and should use late or dynamic linking whenever possible. So, as does MSWindows and other operating systems.
  • This way, you can, in the future, just update the desired library, and perhaps your own application.

View attachment 1349

hug

[/SHOWTOGROUPS]
 

Kleopatra719

New member
Joined
Aug 15, 2017
Messages
3
Reaction score
0
"Hey, I've had success using the FPC (Free Pascal Compiler) to create a 64-bit Linux library from Delphi. The process is very similar to compiling a normal Delphi project, just switch the compiler and you're good to go. Make sure to install FPC and configure your build environment properly first."
 

brookhut

New member
Joined
Oct 3, 2016
Messages
3
Reaction score
0
"Hey, I've managed to get it working by adding the '-shared' and '-fPIC' flags when compiling. It took some fiddling with the CMake config file, but it's all set now. Works like a charm in Delphi!"
 

sergolg14

New member
Joined
Aug 1, 2011
Messages
4
Reaction score
0
Honestly, I've had mixed results with Delphi and cross-compiling for Linux. The Delphi compiler can sometimes have issues with the Linux-specific dependencies, so I'd suggest checking the official Embarcadero documentation for SO libraries on Linux. Any experience with this, OP?
 
Top