digitalmars.D.learn - Understanding how dub works
- datboi (12/12) Dec 12 2017 Hi, I'm learning D (obliviously) and I can't understand how
- rikki cattermole (10/20) Dec 12 2017 Object/static files, but yes.
- timotheecour (6/8) Dec 12 2017 Except when you need to:
- datboi (5/22) Dec 13 2017 At first thanks for answers.
- codephantom (2/3) Dec 12 2017 learning D in an oblivious manner can be difficult ;-)
Hi, I'm learning D (obliviously) and I can't understand how exactly dependencies work. I haven't found answers to my questions in documentation (or i did't understand it), so can someone answer to mine questions? 1. Does dub compile dependencies as separate binaries? And if yes how to specify where should be they placed? 2. It is possible to compile subpackage as a dynamic or static library and link it to main binary file? Or just better create separate dub package and use it as dependency? For all answers thank You in advance. Also sorry for mine English. I'm still learning it. So if I made some grammatic mistakes point them :)
Dec 12 2017
On 12/12/2017 10:20 PM, datboi wrote:Hi, I'm learning D (obliviously) and I can't understand how exactly dependencies work. I haven't found answers to my questions in documentation (or i did't understand it), so can someone answer to mine questions? 1. Does dub compile dependencies as separate binaries? And if yes how to specify where should be they placed?Object/static files, but yes. Where they go: Windows: %APPDATA%/roaming/dub Posix: ~/.dub You don't need to change this and if you think you do, you're wrong :)2. It is possible to compile subpackage as a dynamic or static library and link it to main binary file? Or just better create separate dub package and use it as dependency?Static yes, dynamic it won't link against (some bug last I heard). Have to do that manually. "dependencies": { "mypackage:subpackage": "*" } Change as required for SDL.
Dec 12 2017
On Wednesday, 13 December 2017 at 00:43:31 UTC, rikki cattermole wrote:You don't need to change this and if you think you do, you're wrong :)Except when you need to: https://github.com/dlang/dub/issues/1305 dub build --compiler=ldmd2 overwrites files in ~/.dub written by
Dec 12 2017
On Wednesday, 13 December 2017 at 00:43:31 UTC, rikki cattermole wrote:At first thanks for answers. So going back to my first question. Code from dependencies is compiled with mine project to one single executable?1. Does dub compile dependencies as separate binaries? And if yes how to specify where should be they placed?Object/static files, but yes. Where they go: Windows: %APPDATA%/roaming/dub Posix: ~/.dub You don't need to change this and if you think you do, you're wrong :)2. It is possible to compile subpackage as a dynamic or static library and link it to main binary file? Or just better create separate dub package and use it as dependency?Static yes, dynamic it won't link against (some bug last I heard). Have to do that manually. "dependencies": { "mypackage:subpackage": "*" } Change as required for SDL.
Dec 13 2017
On Tuesday, 12 December 2017 at 22:20:41 UTC, datboi wrote:Hi, I'm learning D (obliviously) ....learning D in an oblivious manner can be difficult ;-)
Dec 12 2017