Author Topic: DLL to LIB unresolved external symbol  (Read 803 times)

2B||!2B

  • Regular Member
  • *
  • Posts: 38
Re: DLL to LIB unresolved external symbol
« Reply #15 on: November 06, 2018, 01:50:07 PM »
Quote
Do you mean loading the DLL directly to memory and then resolve imports/exports/relocs etc and then call the functions directly in memory?

Exactly. You can check the DLLmem example in the attachment.

Thanks for the library Vortex. I will have to consider this option if all other options fail.



Delphi dll exports undecorated function names, so converter can't know that decorated name.

EDIT:
Code: [Select]
library MyDLL;

function AddNumbers(a:Integer;b:Integer):Integer;stdcall;forward;

exports
  AddNumbers, AddNumbers name 'AddNumbers@8';

function AddNumbers(a:Integer;b:Integer):Integer  ;  stdcall;
begin
  Result  := a + b;
end;
end.

I don't think this is the problem. I have tried to use the name AddNumbers@8 but it still has the same linking error.
My bad,
Code: [Select]
exports
  AddNumbers, AddNumbers name '_AddNumbers@8';
I made a test ;)

Nice work there Timo.
How did you get it to work?
I can't seem to get rid of the linking error even with your dll!
Are there any specific options you have chosen in DLL2LIB?
Which version are you using? i am on 3.0.

EDIT:
For some reason, i have to use this one to get it working

Code: [Select]
exports
  AddNumbers name 'AddNumbers@8';

Very nice work Timo! :greenclp:
« Last Edit: November 06, 2018, 03:22:20 PM by 2B||!2B »