News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

DLL to LIB unresolved external symbol

Started by 2B||!2B, November 05, 2018, 04:39:40 PM

Previous topic - Next topic

2B||!2B

#15
Quote from: Vortex on November 06, 2018, 07:33:59 AM
QuoteDo 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.



Quote from: TimoVJL on November 06, 2018, 09:25:11 AM
Quote from: 2B||!2B on November 06, 2018, 07:24:39 AM
Quote from: TimoVJL on November 05, 2018, 11:05:42 PM
Delphi dll exports undecorated function names, so converter can't know that decorated name.

EDIT: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,
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


exports
  AddNumbers name 'AddNumbers@8';


Very nice work Timo! :greenclp: