On Monday, 25 August 2014 at 15:09:59 UTC, Taylor Hillegeist
wrote:
So i have been trying to follow the instructions on:
http://wiki.dlang.org/Win32_DLLs_in_D
but when i get to the step where i compile the dll
dmd -ofmydll.dll -L/IMPLIB mydll.d dll.d mydll.def
I get this output:
OPTLINK (R) for Win32 Release 8.00.15
Copyright (C) Digital Mars 1989-2013 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Error 180: No Match Found for Export/ENTRY - :
DllGetClassObject
OPTLINK : Error 180: No Match Found for Export/ENTRY - :
DllCanUnloadNow
OPTLINK : Error 180: No Match Found for Export/ENTRY - :
DllRegisterServer
OPTLINK : Error 180: No Match Found for Export/ENTRY - :
DllUnregisterServer
OPTLINK : Error 81: Cannot EXPORT : DllCanUnloadNow
OPTLINK : Error 81: Cannot EXPORT : DllGetClassObject
OPTLINK : Error 81: Cannot EXPORT : DllRegisterServer
OPTLINK : Error 81: Cannot EXPORT : DllUnregisterServer
--- errorlevel 8
Not, very pretty. Do I have something not setup right? Im using
the latest DMD as of 8/25/2014. 2.066.0
Any Ideas?
If you don't use the extern(C) foreign function interface then
the name won't match to the export name as written in the source
(in the binary you'll get the bytecount of all the param size
with a @ before).
si you need to create a name table for optlink
(http://www.digitalmars.com/ctg/ctgDefFiles.html)
(http://www.digitalmars.com/archives/cplusplus/4029.html)