Recent

Author Topic: How to break exe into obj file or dll ,bpl  (Read 870 times)

Packs

  • Sr. Member
  • ****
  • Posts: 290
How to break exe into obj file or dll ,bpl
« on: July 30, 2024, 09:38:39 pm »
How to break exe into multiple obj file ,dll,bpl file in Lazarus

TRon

  • Hero Member
  • *****
  • Posts: 3297
Re: How to break exe into obj file or dll ,bpl
« Reply #1 on: July 30, 2024, 09:41:42 pm »
How to break exe into multiple obj file ,dll,bpl file in Lazarus
I am afraid that I do not fully understand the question.

Every unit is already automatically compiled into its own object and linked together by the compiler/linker.

A dll needs to be crafted manually, see https://www.freepascal.org/docs-html/prog/progse55.html

bpl's do not have a fpc/lazarus counterpart.
« Last Edit: July 30, 2024, 09:49:46 pm by TRon »
This tagline is powered by AI

440bx

  • Hero Member
  • *****
  • Posts: 4568
Re: How to break exe into obj file or dll ,bpl
« Reply #2 on: July 30, 2024, 11:14:20 pm »
How to break exe into multiple obj file ,dll,bpl file in Lazarus
An executable cannot be broken into obj, dll or bpl files.

Obj files are gathered together by the linker to create the exe (or dll or bpl or some other extension.)

HTH.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

Remy Lebeau

  • Hero Member
  • *****
  • Posts: 1408
    • Lebeau Software
Re: How to break exe into obj file or dll ,bpl
« Reply #3 on: July 30, 2024, 11:54:20 pm »
You can't simply break up an EXE.  You need to create a whole separate DLL or BPL project and move the desired units to it, then compile it.  Then change the EXE project to use that DLL or BPL, and recompile it.
Remy Lebeau
Lebeau Software - Owner, Developer
Internet Direct (Indy) - Admin, Developer (Support forum)

cdbc

  • Hero Member
  • *****
  • Posts: 1535
    • http://www.cdbc.dk
Re: How to break exe into obj file or dll ,bpl
« Reply #4 on: July 31, 2024, 01:06:00 am »
Hi
As Dirty Harry said: "Do you feel lucky?", "...Well, do you P###"?!?
If you do then have a 'looksee' here: https://sourceforge.net/projects/rd-dpf/
DPF ~ (D)elphi(P)lugin(F)ramework, translated to FreePascal it works too  8-)
Have fun
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

Packs

  • Sr. Member
  • ****
  • Posts: 290
Re: How to break exe into obj file or dll ,bpl
« Reply #5 on: July 31, 2024, 01:36:54 pm »
Thanks

MarkMLl

  • Hero Member
  • *****
  • Posts: 7720
Re: How to break exe into obj file or dll ,bpl
« Reply #6 on: July 31, 2024, 02:35:18 pm »
How to break exe into multiple obj file ,dll,bpl file in Lazarus

To add to what everybody else has said, let's see we can explain this in terms that almost anyperson should be able to understand.

You can dismantle a car into engine, wheels, transmission, sundry fasteners and a pile of light scrap.

You can't dismantle a car into a motorcycle, even though it might be possible to re-use some of a car's fasteners etc. to make one.

You can't dismantle a car into a helicopter, and a car lacks even the basic raw materials to make some parts (e.g. light alloys or composites for the rotors).

You might possibly be able to dismantle a .exe into .obj files, but it would take specialist tools and would rely on the presence of debugging information. However the files you ended up with might be /strictly/ correct as far as formats etc. go, but would bear little resemblance to what the original programmer had.

You can't dismantle a .exe into a .dll or .bpl, although it might be possible to reuse some of a .exe's components (.obj files etc.) to construct one (which might in practice be very little use for anything).

Over the decades, I have been asked /repeatedly/ for a decompiler. In some cases by people who actually appeared to have some minimal understanding of the development process.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Packs

  • Sr. Member
  • ****
  • Posts: 290
Re: How to break exe into obj file or dll ,bpl
« Reply #7 on: July 31, 2024, 05:33:23 pm »
Dear all,

When I was working in delphi my exe is working like a video player . it is loading all form at run time from bpl files .

in lazarus it is bundling everything in to  single exe .

what is my expectation is like it should be browser and it should show page on screen. if there is any change in small module . I can able to release one module only


marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11780
  • FPC developer.
Re: How to break exe into obj file or dll ,bpl
« Reply #8 on: July 31, 2024, 05:39:45 pm »
When I was working in delphi my exe is working like a video player . it is loading all form at run time from bpl files .

Yes, that is not possible yet. Some work has been done, but it is still long ways, specially multiplatform.


Packs

  • Sr. Member
  • ****
  • Posts: 290
Re: How to break exe into obj file or dll ,bpl
« Reply #9 on: July 31, 2024, 08:57:17 pm »
Thank friend

 

TinyPortal © 2005-2018