Linking not working properly Windows 11

ryuukk_ ryuukk.dev at gmail.com
Sat Nov 5 15:16:20 UTC 2022


On Saturday, 5 November 2022 at 13:30:43 UTC, bauss wrote:
> Fresh install of DMD and when trying to use ex. std.file from 
> Phobos I get the following linking error: (I can trigger 
> different ones depending on modules imported etc.)
>
> ```
> lld-link: error: undefined symbol: tzset
> ```
>
> I assume it has something to do with the C runtime or 
> something, but everything should be setup correct, so maybe 
> some path or something that is incorrect that I may need to 
> modify? I have no idea what I need to do however.
>
> I am using dub as well, so basically compiling using:
>
> ```
> dub build -a=x86_64
> ```
>
> Is there anything I am missing or what should I do? Currently D 
> is unusable for me on my new machine because of this.
>
> If anybody knows how I can just get things to work, it seems 
> like D never works out of the box, which is very unfortunate.
>
> This is literally my file:
>
> ```d
> module main;
>
> import std.file : readText, exists, write;
>
> void main() {}
> ```
>
> It's as minimal as an example as I can give pretty much.
>
> A similar issue was with C++ runtime libraries such as 
> libcmt.lib not being linked and I ended up having to move the 
> files manually to my project folder, as I don't know how to fix 
> it properly as there aren't any clear instructions anywhere on 
> how to fix invalid paths etc. or what to do when linking just 
> doesn't find the files despite them existing.
>
> If anyone can help me fix this then I will be very grateful.

do you have visual studio installed? if so what version?

do you have msys installed? is it in your PATH?


More information about the Digitalmars-d-learn mailing list