Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
June 14, 2007 How to create a DLL | ||||
---|---|---|---|---|
| ||||
I try to build a DLL with dmd on windows with tango. with empty functions that worked. When i put only a switch statement into a method, the linker complains about a missing "__Dmain". Why is that? |
June 14, 2007 Re: How to create a DLL | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frank Benoit | Frank Benoit wrote: > I try to build a DLL with dmd on windows with tango. > > with empty functions that worked. When i put only a switch statement > into a method, the linker complains about a missing "__Dmain". Why is that? Did you include a DllMain? http://www.digitalmars.com/d/dll.html Also check out the mydll example the comes with dmd. |
June 14, 2007 Re: How to create a DLL | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frank Benoit | Frank Benoit wrote: > I try to build a DLL with dmd on windows with tango. > > with empty functions that worked. When i put only a switch statement > into a method, the linker complains about a missing "__Dmain". Why is that? I don't think DLL's are created with the linker, they are created with lib.exe -> http://www.digitalmars.com/ctg/lib.html |
June 14, 2007 Re: How to create a DLL | ||||
---|---|---|---|---|
| ||||
Posted in reply to torhu | torhu wrote:
> Frank Benoit wrote:
>> I try to build a DLL with dmd on windows with tango.
>>
>> with empty functions that worked. When i put only a switch statement
>> into a method, the linker complains about a missing "__Dmain". Why is that?
>
> Did you include a DllMain?
>
> http://www.digitalmars.com/d/dll.html
>
> Also check out the mydll example the comes with dmd.
Please note that the process of actually initializing the runtime for a Tango DLL is somewhat different than Phobos. You basically just call rt_init() to initialize and rt_term() to terminate. I'll see about documenting this somewhere.
Sean
|
June 15, 2007 Re: How to create a DLL | ||||
---|---|---|---|---|
| ||||
Posted in reply to Charlie | Charlie wrote:
> Frank Benoit wrote:
>> I try to build a DLL with dmd on windows with tango.
>>
>> with empty functions that worked. When i put only a switch statement
>> into a method, the linker complains about a missing "__Dmain". Why is that?
>
> I don't think DLL's are created with the linker, they are created with lib.exe -> http://www.digitalmars.com/ctg/lib.html
No, DLLs (aka Dynamic Link Libraries) are created by the linker. Libraries (aka Static Link Libraries) are created by lib.
|
June 16, 2007 Re: How to create a DLL | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> Charlie wrote:
>> Frank Benoit wrote:
>>> I try to build a DLL with dmd on windows with tango.
>>>
>>> with empty functions that worked. When i put only a switch statement
>>> into a method, the linker complains about a missing "__Dmain". Why is that?
>>
>> I don't think DLL's are created with the linker, they are created with lib.exe -> http://www.digitalmars.com/ctg/lib.html
>
> No, DLLs (aka Dynamic Link Libraries) are created by the linker. Libraries (aka Static Link Libraries) are created by lib.
Ack, ignore me !
|
Copyright © 1999-2021 by the D Language Foundation