Thread overview
Can't create dll
Nov 16, 2013
Yaroslav
Nov 16, 2013
Ary Borenszweig
Nov 16, 2013
Yaroslav
Nov 16, 2013
Ary Borenszweig
Nov 17, 2013
John J
Nov 17, 2013
Nick
November 16, 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
November 16, 2013
On 11/16/13 5:11 PM, Yaroslav wrote:
> 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

Maybe also add -c:

-c             do not link

November 16, 2013
Yes, it works, thank you!
November 16, 2013
On 11/16/13 5:11 PM, Yaroslav wrote:
> I'm trying to create dll. It is template in mono-d plugin.

By the way, someone should *really* rename this list to "D.dev" or something similar, and put it at the bottom (or just put digitalmars.D.learn at the top top).

November 17, 2013
On 11/16/2013 05:05 PM, Ary Borenszweig wrote:
> On 11/16/13 5:11 PM, Yaroslav wrote:
>> I'm trying to create dll. It is template in mono-d plugin.
>
> By the way, someone should *really* rename this list to "D.dev" or
> something similar, and put it at the bottom (or just put
> digitalmars.D.learn at the top top).
>

More than top or bottom, the name of the D newsgroup itself should indicate it's purpose. Something like "D.core" or "D.compilerdesign" etc.,
Then they would look for the more friendly and suitable names and quickly find the "D.learn" wherever it is in the list.

November 17, 2013
D.design seems like a clear and simple name to me, and the description should probably be changed from "General discussion of the D programming language." to "Discussion about the design and implementation of the D programming language."

On Sunday, 17 November 2013 at 05:03:33 UTC, John J wrote:
> On 11/16/2013 05:05 PM, Ary Borenszweig wrote:
>> On 11/16/13 5:11 PM, Yaroslav wrote:
>>> I'm trying to create dll. It is template in mono-d plugin.
>>
>> By the way, someone should *really* rename this list to "D.dev" or
>> something similar, and put it at the bottom (or just put
>> digitalmars.D.learn at the top top).
>>
>
> More than top or bottom, the name of the D newsgroup itself should indicate it's purpose. Something like "D.core" or "D.compilerdesign" etc.,
> Then they would look for the more friendly and suitable names and quickly find the "D.learn" wherever it is in the list.