Can't create dll

Yaroslav rybalka.yaroslav at gmail.com
Sat Nov 16 12:11:13 PST 2013


I'm trying to create dll. It is template in mono-d plugin.
module myclass;

class MyClass
{
	//TODO: Enter class code here
}

export:
extern(D):

MyClass createMyClass()
{
	return new MyClass();
}

//////////////////

Build completed with errors.
Compiler output:
Building: dshared (Debug)
Performing main compilation...
Current dictionary: C:\Users\yrybalka\Documents\dshared\dshared
dmd.exe -debug -gc "myclass.d"  "-IC:\D\dmd2\src\phobos" 
"-L/IMPLIB:C:\Users\yrybalka\Documents\dshared\dshared\bin\Debug\dshared.lib" 
"-odobj\Debug" 
"-ofC:\Users\yrybalka\Documents\dshared\dshared\bin\Debug\dshared.dll"

OPTLINK (R) for Win32  Release 8.00.13
Copyright (C) Digital Mars 1989-2010  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
obj\Debug\dshared.obj(dshared)
  Error 42: Symbol Undefined _D6object6Object6toHashMFNbNeZk
obj\Debug\dshared.obj(dshared)
  Error 42: Symbol Undefined _D6object6Object8toStringMFZAya
obj\Debug\dshared.obj(dshared)
  Error 42: Symbol Undefined _D6Object7__ClassZ
obj\Debug\dshared.obj(dshared)
  Error 42: Symbol Undefined __d_newclass
obj\Debug\dshared.obj(dshared)
  Error 42: Symbol Undefined _D14TypeInfo_Class6__vtblZ
obj\Debug\dshared.obj(dshared)
  Error 42: Symbol Undefined _D6object6Object8opEqualsMFC6ObjectZb
obj\Debug\dshared.obj(dshared)
  Error 42: Symbol Undefined _D6object6Object5opCmpMFC6ObjectZi
--- errorlevel 7
Exit code 7


And when I add void main(){}, all errors disappear. What I did 
wrong?

Windows 8.1 x64, dmd 2.064


More information about the Digitalmars-d mailing list