NO

Author Topic: DEF files [SOLVED]  (Read 2496 times)

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
DEF files [SOLVED]
« on: September 28, 2014, 10:41:55 PM »
We have found some problems on DEF files behaviour.
While using the symbol name as wrote in the source exports the correctly decorated symbol, it seems not possible to export a that symbol with the same name as in source code. I.e. the following don't generates any symbol:
Code: [Select]
SampleFunction = _SampleFunction@8 ;without stdcall decorations and underscore
This DEF statement is ignored.

The exporting of forwarded symbols (as reported in the help) doesn't seem to work.
I.e:
Code: [Select]
mybeep                = kernel32._Beep@8 ;This don't work
The address is not resolved when executable is loaded and program crashes! :(
Strangely it seems to work in this way including the DLL in the linker:
Code: [Select]
mybeep                = _Beep@8
« Last Edit: March 09, 2015, 05:19:18 PM by frankie »
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: DEF files
« Reply #1 on: October 13, 2014, 02:18:32 PM »
And for Win32 x86
Code: [Select]
#pragma comment(linker, "-export:MessageBoxA=user32.MessageBoxA")gives
Code: [Select]
POLINK: error: Unresolved external symbol 'MessageBoxA'.
Look here
« Last Edit: October 13, 2014, 09:59:05 PM by TimoVJL »
May the source be with you