On Sunday, 21 April 2013 at 15:20:28 UTC, Diggory wrote:
OK, thanks I think I've got the hang of the way linking works now - I was confused about how some things didn't seem to require libs to work, but now I see it's because those things were compiled into "druntime.lib" which was compiled into "phobos.lib".

phobos and druntime linked automatically, though i am unaware of where it goes, so can't tell for sure.


Is there a compiler independent way to tell the linker to automatically link in a specific library from within a .d file? (preferable this hint should still exist in the .di file generated from that .d file, and be transitive so dependencies automatically get linked in just by "import"ing the required stuff) If not can I suggest this as a feature?

there is pragma for this:
pragma(lib, "mylib.lib");
read this. http://dlang.org/pragma.html

Am I correct in thinking there is no specific order in the contents of windows.d? I've rearranged mine so that functions are ordered by module then header file so I can more easily see if a function already exists, and if not where to add it. Would these changes be of any use?

in D order of imports doesn't important.

also i would suggest you read all documents in language reference, how-tos, and sections, they are not so big but it will give answer to most begginers questions. also start reading library reference, you will save much time later.

Reply via email to