Re: Why is DUB not passing dll.def file to linker

2017-05-21 Thread Igor via Digitalmars-d-learn
On Sunday, 21 May 2017 at 11:47:15 UTC, Mike Parker wrote: So what I would try in your situation is to add three new configurations to the exeProject's dub.json. Use the "platforms" directive to limit one to "windows-x86", another to "windows-x86_64", and leave the other one empty. List the

Re: Why is DUB not passing dll.def file to linker

2017-05-21 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 21 May 2017 at 11:42:02 UTC, Mike Parker wrote: On Sunday, 21 May 2017 at 10:53:42 UTC, Igor wrote: Dynamic libraries are not yet supported as dependencies - building as static library. I see. And I'm not surprised. DLL support on Windows (at least in DMD, not sure about LDC)

Re: Why is DUB not passing dll.def file to linker

2017-05-21 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 21 May 2017 at 10:53:42 UTC, Igor wrote: Dynamic libraries are not yet supported as dependencies - building as static library. I see. And I'm not surprised. DLL support on Windows (at least in DMD, not sure about LDC) is still not where it needs to be. I don't know how much has

Re: Why is DUB not passing dll.def file to linker

2017-05-21 Thread Igor via Digitalmars-d-learn
On Sunday, 21 May 2017 at 10:15:40 UTC, Mike Parker wrote: Then you can add the following to exeProject/dub.json: "dependencies": { "dllProjectName": {"path" : "../dllProject" } } I would expect the import lib to be linked automatically. This should ensure the dll is compiled with the

Re: Why is DUB not passing dll.def file to linker

2017-05-21 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 21 May 2017 at 09:37:56 UTC, Igor wrote: If I now run dub build in main project both projects compile and work together, but if I run dub build -ax86_64 only main project is built as 64bit while dll project is still being built as 32bit. Does anyone have a suggestion how can I make

Re: Why is DUB not passing dll.def file to linker

2017-05-21 Thread Igor via Digitalmars-d-learn
On Saturday, 20 May 2017 at 21:36:42 UTC, Mike Parker wrote: On Saturday, 20 May 2017 at 20:26:29 UTC, Igor wrote: So my question is if the fix is so simple what are the reasons it isn't implemented? Am I missing something? I don't know, but you could always submit a PR or an enhancement

Re: Why is DUB not passing dll.def file to linker

2017-05-20 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 20 May 2017 at 20:26:29 UTC, Igor wrote: So my question is if the fix is so simple what are the reasons it isn't implemented? Am I missing something? I don't know, but you could always submit a PR or an enhancement request.

Re: Why is DUB not passing dll.def file to linker

2017-05-20 Thread Igor via Digitalmars-d-learn
On Saturday, 20 May 2017 at 20:04:27 UTC, Mike Parker wrote: On Saturday, 20 May 2017 at 19:53:16 UTC, Igor wrote: There is no mention of dll.def file. Add a "sourceFiles" directive: "sourceFiles-windows" : ["dll.def"] See the comments at the following:

Re: Why is DUB not passing dll.def file to linker

2017-05-20 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 20 May 2017 at 19:53:16 UTC, Igor wrote: There is no mention of dll.def file. Add a "sourceFiles" directive: "sourceFiles-windows" : ["dll.def"] See the comments at the following: https://github.com/dlang/dub/issues/575 https://github.com/dlang/dub/pull/399

Why is DUB not passing dll.def file to linker

2017-05-20 Thread Igor via Digitalmars-d-learn
I am using DUB 1.3.0. My folder structure is: project dub.json source windll.d handmade.d dll.def dub.json looks like this: { "name": "handmade", "targetType": "dynamicLibrary", "targetPath": "build", "configurations": [ {