Re: strange link error: _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm _My_struct__xopEqualsMxFKxSQBlQBoQBiZb

2023-10-16 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 17/10/2023 4:18 PM, mw wrote: Is string basic types? as I showed one earlier Foo {one string and two ints}, my other struct only has double and long, it also has the same link errors about toHash and opEquals. string is not a basic type, its a slice, which means pointer.

Re: strange link error: _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm _My_struct__xopEqualsMxFKxSQBlQBoQBiZb

2023-10-16 Thread mw via Digitalmars-d-learn
On Tuesday, 17 October 2023 at 01:54:12 UTC, Richard (Rikki) Andrew Cattermole wrote: On 17/10/2023 2:15 PM, mw wrote: On Tuesday, 17 October 2023 at 01:11:13 UTC, Richard (Rikki) Andrew Cattermole wrote: They are for structs as well. Ah?! I use quite a few struts, but I never have provided s

Re: strange link error: _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm _My_struct__xopEqualsMxFKxSQBlQBoQBiZb

2023-10-16 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 17/10/2023 2:17 PM, mw wrote: It's just my own module and type name, nothing special or interesting. Doesn't matter. Because I now can't demangle it and figure out what its trying to find without doing that by hand. Every character in a symbol name is significant, you can't remove some of

Re: strange link error: _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm _My_struct__xopEqualsMxFKxSQBlQBoQBiZb

2023-10-16 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 17/10/2023 2:15 PM, mw wrote: On Tuesday, 17 October 2023 at 01:11:13 UTC, Richard (Rikki) Andrew Cattermole wrote: They are for structs as well. Ah?! I use quite a few struts, but I never have provided such two methods. Indeed, they are generated by the compiler, not user provided. They

Re: strange link error: _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm _My_struct__xopEqualsMxFKxSQBlQBoQBiZb

2023-10-16 Thread mw via Digitalmars-d-learn
On Tuesday, 17 October 2023 at 01:14:04 UTC, Richard (Rikki) Andrew Cattermole wrote: On 17/10/2023 1:58 PM, mw wrote: Oh the <_My_struct> part is my simplification, it is mangled as something like : _D6..<_My_struct>..__xtoHashFNbNeKxSQBlQBoQBiZm When dealing with linker errors, please do no

Re: strange link error: _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm _My_struct__xopEqualsMxFKxSQBlQBoQBiZb

2023-10-16 Thread mw via Digitalmars-d-learn
On Tuesday, 17 October 2023 at 01:11:13 UTC, Richard (Rikki) Andrew Cattermole wrote: They are for structs as well. Ah?! I use quite a few struts, but I never have provided such two methods.

Re: strange link error: _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm _My_struct__xopEqualsMxFKxSQBlQBoQBiZb

2023-10-16 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 17/10/2023 1:58 PM, mw wrote: Oh the <_My_struct> part is my simplification, it is mangled as something like : _D6..<_My_struct>..__xtoHashFNbNeKxSQBlQBoQBiZm When dealing with linker errors, please do not simplify, it can make problems unsolvable.

Re: strange link error: _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm _My_struct__xopEqualsMxFKxSQBlQBoQBiZb

2023-10-16 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
They are for structs as well.

Re: strange link error: _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm _My_struct__xopEqualsMxFKxSQBlQBoQBiZb

2023-10-16 Thread mw via Digitalmars-d-learn
On Tuesday, 17 October 2023 at 00:44:17 UTC, Richard (Rikki) Andrew Cattermole wrote: xtoHash and xopEquals are generated by the compiler automatically. These two are for `class`, but shouldn't be generated for `struct`, right?

Re: strange link error: _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm _My_struct__xopEqualsMxFKxSQBlQBoQBiZb

2023-10-16 Thread mw via Digitalmars-d-learn
On Tuesday, 17 October 2023 at 00:44:17 UTC, Richard (Rikki) Andrew Cattermole wrote: xtoHash and xopEquals are generated by the compiler automatically. Curiously those two symbol names are not demangling. Given this, I suspect the best thing to do is file a bug report with ldc with the code

Re: strange link error: _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm _My_struct__xopEqualsMxFKxSQBlQBoQBiZb

2023-10-16 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
xtoHash and xopEquals are generated by the compiler automatically. Curiously those two symbol names are not demangling. Given this, I suspect the best thing to do is file a bug report with ldc with the code that generated the linker error.

Re: strange link error: _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm _My_struct__xopEqualsMxFKxSQBlQBoQBiZb

2023-10-16 Thread mw via Digitalmars-d-learn
On Monday, 16 October 2023 at 21:20:39 UTC, mw wrote: It's very hard to isolate the problem. I have comment out that piece part of code for now (non-essential part of my program): comment out where the struct is used, not the struct definition. Anyway, I will try some time later. BTW, the st

Re: strange link error: _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm _My_struct__xopEqualsMxFKxSQBlQBoQBiZb

2023-10-16 Thread mw via Digitalmars-d-learn
It's very hard to isolate the problem. I have comment out that piece part of code for now (non-essential part of my program): comment out where the struct is used, not the struct definition. Anyway, I will try some time later.

Re: strange link error: _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm _My_struct__xopEqualsMxFKxSQBlQBoQBiZb

2023-10-16 Thread Imperatorn via Digitalmars-d-learn
On Monday, 16 October 2023 at 20:06:02 UTC, ryuukk_ wrote: On Monday, 16 October 2023 at 19:36:07 UTC, Imperatorn wrote: On Monday, 16 October 2023 at 18:20:27 UTC, mw wrote: [...] Show your code here on in Discord https://discord.gg/wKTvGNpc No, show your code here on the forum, don't nee

Re: strange link error: _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm _My_struct__xopEqualsMxFKxSQBlQBoQBiZb

2023-10-16 Thread ryuukk_ via Digitalmars-d-learn
On Monday, 16 October 2023 at 19:36:07 UTC, Imperatorn wrote: On Monday, 16 October 2023 at 18:20:27 UTC, mw wrote: Hi, I just encountered a strange link error: I have a `struct` type `My_struct`, the program compiles fine, but at link time, it errors out: undefined reference to _My_struct_

Re: strange link error: _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm _My_struct__xopEqualsMxFKxSQBlQBoQBiZb

2023-10-16 Thread Imperatorn via Digitalmars-d-learn
On Monday, 16 October 2023 at 18:20:27 UTC, mw wrote: Hi, I just encountered a strange link error: I have a `struct` type `My_struct`, the program compiles fine, but at link time, it errors out: undefined reference to _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm undefined reference to _My_struct__

strange link error: _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm _My_struct__xopEqualsMxFKxSQBlQBoQBiZb

2023-10-16 Thread mw via Digitalmars-d-learn
Hi, I just encountered a strange link error: I have a `struct` type `My_struct`, the program compiles fine, but at link time, it errors out: undefined reference to _My_struct__xtoHashFNbNeKxSQBlQBoQBiZm undefined reference to _My_struct__xopEqualsMxFKxSQBlQBoQBiZb looks like it treats My_str