On Tuesday, 24 March 2020 at 15:22:19 UTC, Steven Schveighoffer wrote:
On 3/24/20 10:28 AM, realhet wrote:
On Sunday, 22 March 2020 at 20:20:17 UTC, Steven Schveighoffer
If this were Linux, I'd start using nm to search the object files for the symbol that is missing (like search for symbols defining hasToString), and see if it possibly might be mangled in a different way. I'm not sure what tools there are on Windows to do this.

-Steve

I've found a similar tool in MSVC, it's called DUMPBIN.
I was able to find that the linker errors were correct: I wasn't able to find even smaller substrings of that std.format.hasToString symbol, it was called like 4 times.

But I had a clue: A problem when trying to call hasToString on my struct, so I located all the references for that and I've found this thing:

    //infoArray.enumerate.each!writeln;
//!!! LDC 1.20.0 win64 linker bug when using enumerate here!!!!!

    //foreach(i, a; infoArray) writeln(tuple(i, a));
    //!!! linker error as well

    //foreach(i, a; infoArray) writeln(tuple(i, i+1));
//!!! this is bad as well, the problem is not related to own structs, just to tuples

foreach(i, a; infoArray) writefln("(%s, %s)", i, a); //this works


Now I know that [LDC 1.20.0 win64 -allinst] has a problem generating the code for tuple parameters in std.format calls.
This was not a problem in 1.6.0

Now I go on and try my bigger projects.

Reply via email to