digitalmars.D - How to create a DLL
- Frank Benoit <keinfarbton googlemail.com> Jun 14 2007
- torhu <fake address.dude> Jun 14 2007
- Sean Kelly <sean f4.ca> Jun 14 2007
- Charlie <charlie.fats gmail.com> Jun 14 2007
- Walter Bright <newshound1 digitalmars.com> Jun 14 2007
- Charlie <charlie.fats gmail.com> Jun 16 2007
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?
Jun 14 2007
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.
Jun 14 2007
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
Jun 14 2007
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
Jun 14 2007
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.
Jun 14 2007
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 !
Jun 16 2007









Sean Kelly <sean f4.ca> 