Thread overview | ||||||
---|---|---|---|---|---|---|
|
March 15, 2019 how to complie a x64 dll wiht a x64 host exe? i need the command line code. | ||||
---|---|---|---|---|
| ||||
i see a simple dll creation in sample fold, but i am confused with the command line and i donnot know how to complie a x64 dll wiht a x64 host exe. i think need a clear command line arguments. |
March 15, 2019 Re: how to complie a x64 dll wiht a x64 host exe? i need the command line code. | ||||
---|---|---|---|---|
| ||||
Posted in reply to ll | On Friday, 15 March 2019 at 09:22:35 UTC, ll wrote: > i see a simple dll creation in sample fold, but i am confused with the command line and i donnot know how to complie a x64 dll wiht a x64 host exe. i think need a clear command line arguments. There is an open pr for dub. X64 will then automatically be used if your system is capable. For now you have to use argument -a x86_64. In dub.json set the targetType to dynamicLibrary. https://dub.pm/package-format-json.html#target-types Kind regards Andre |
March 16, 2019 Re: how to complie a x64 dll wiht a x64 host exe? i need the command line code. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andre Pany | On Friday, 15 March 2019 at 15:08:48 UTC, Andre Pany wrote: > On Friday, 15 March 2019 at 09:22:35 UTC, ll wrote: >> i see a simple dll creation in sample fold, but i am confused with the command line and i donnot know how to complie a x64 dll wiht a x64 host exe. i think need a clear command line arguments. > > There is an open pr for dub. X64 will then automatically be used if your system is capable. For now you have to use argument -a x86_64. > > In dub.json set the targetType to dynamicLibrary. > > https://dub.pm/package-format-json.html#target-types > > Kind regards > Andre thank you for your reply. but I still have problems: 1.what's the meaning of " -L/IMPLIB" in the sample dll command line"..\..\..\windows\bin\dmd -ofmydll.dll -L/IMPLIB mydll.d dll.d mydll.def..\..\..\windows\bin\dmd test.d mydll.lib" ? Can you break command into two segment, one is used to build dll and generate the lib,another is used to generate the host exe and use the lib? 2.in the the dub.json or in dub arguments, how to command the compiler to generate the lib file? |
March 16, 2019 Re: how to complie a x64 dll wiht a x64 host exe? i need the command line code. | ||||
---|---|---|---|---|
| ||||
Posted in reply to ll | On Saturday, 16 March 2019 at 10:46:32 UTC, ll wrote: > On Friday, 15 March 2019 at 15:08:48 UTC, Andre Pany wrote: >> On Friday, 15 March 2019 at 09:22:35 UTC, ll wrote: >>> [...] >> >> There is an open pr for dub. X64 will then automatically be used if your system is capable. For now you have to use argument -a x86_64. >> >> In dub.json set the targetType to dynamicLibrary. >> >> https://dub.pm/package-format-json.html#target-types >> >> Kind regards >> Andre > > thank you for your reply. but I still have problems: > 1.what's the meaning of " -L/IMPLIB" in the sample dll command line"..\..\..\windows\bin\dmd -ofmydll.dll -L/IMPLIB mydll.d dll.d mydll.def..\..\..\windows\bin\dmd test.d mydll.lib" ? Can you break command into two segment, one is used to build dll and generate the lib,another is used to generate the host exe and use the lib? > 2.in the the dub.json or in dub arguments, how to command the compiler to generate the lib file? I do not remember the details but There is also the wiki page https://wiki.dlang.org/Win32_DLLs_in_D You can also set targetType to staticLibrary in dub.json to get a lib file. Kind regards Andre |
Copyright © 1999-2021 by the D Language Foundation