JustasMasiulis / xorstr

heavily vectorized c++17 compile time string encryption.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

compiling with clang gives 2 errors

beranos opened this issue · comments

hi i'm trying to compile this with clang but i'm getting the following errors ( 2 ):

xorstr.h(184,28): error : definition with same mangled name '??0?$xor_string@U?$tstring_@$0CO@$0GK@$0GB@$0HC@$0A@@detail@jm@@U?$_ki@$0A@$0?GKNNEFCACGHIFHND@@23@U?$_ki@$00$0?CMAMICDJGCBFOCDK@@23@@jm@@QEAA@XZ' as another definition
xorstr.h(194,33): error : definition with same mangled name '?crypt@?$xor_string@U?$tstring_@$0CO@$0GK@$0GB@$0HC@$0A@@detail@jm@@U?$_ki@$0A@$0?GKNNEFCACGHIFHND@@23@U?$_ki@$00$0?CMAMICDJGCBFOCDK@@23@@jm@@QEAAXXZ' as another definition

i can build this fine with msvc tho

Will take a look once I get back home

Is there any chance you can get me a minimal recreation? Or at least some more info like the compiler version?

Is there any chance you can get me a minimal recreation? Or at least some more info like the compiler version?

how can i get the compiler version? i'm guessing it's the last one since i downloaded it from the visual studio installer 2/3 weeks ago

can't really recreate man. I need something more concrete like a reproduction

i guess this can be closed then, it must be a problem with my project but the project is so big so i don't even know what can use it.

Sorry that I couldn't help. Haven't ever even seen that error before 🤷

Sorry that I couldn't help. Haven't ever even seen that error before 🤷

found out why that happend, i had a line that did this:
if (x)
return xorstr_(L"empty");

removing that line fixed that error
btw i use that exact same string somewhere else but without wide character literals and wide-character string and removing that i get no error with the code above

if (x)
     return xorstr_(L"empty");

This is not valid usage in the first place. It returns a pointer to buffer that was in the called functions frame.