Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio 2017 support #34

Open
Owen0225 opened this issue Nov 1, 2020 · 8 comments
Open

Visual Studio 2017 support #34

Owen0225 opened this issue Nov 1, 2020 · 8 comments
Labels
wontfix This will not be worked on

Comments

@Owen0225
Copy link

Owen0225 commented Nov 1, 2020

image
image
As shown in the figure

@JustasMasiulis
Copy link
Owner

Could you provide compiler output (output tab instead of the errors tab) so I can see the error code or at least translate what they say?

@Paavs-Git
Copy link

Paavs-Git commented Nov 2, 2020

Seems related: I have this in line 139 and 182
1

Building gives this error:
2

And this note:
3

Building as Release x64, happens with 'ISO C++17 Standard (/std:c++17)' and 'ISO C++ Latest Draft Standard (/std:c++latest)', VS 2017.

If you need more info, let me know how to get it.

@Paavs-Git
Copy link

Commit b37d4de builds without error and seems to work with 'printf', 'wprintf', 'puts', and '_putws'.

With 'cout' it gives an error for wide chars (chars work fine):
2

1

I'm fine without the optimizations and can work around 'cout' so for now that commit works as a work-around. Thanks for sharing the project.

@Owen0225
Copy link
Author

Owen0225 commented Nov 4, 2020

Seems to be just a prompt error, compiled through

@JustasMasiulis
Copy link
Owner

@Paavs-Git So I looked into it and the only mitigation I could do in my code is add an #if defined(_MSC_VER) && _MSCVER > ... and duplicate the code. I'd really recommend to just update your visual studio and it would solve itself.

@Paavs-Git
Copy link

@JustasMasiulis I assume you mean to VS 2019, correct? I'm using Win 10 LTSB (2016) which is not supported by VS 2019, unfortunately.
If you could post what to add to support VS 2017 it would be nice, if you don't want to bother I'd just be missing the recent optimizations, since the previous commit works for me as mentioned, and I'm fine with that too.
Thanks for looking into it.

@JustasMasiulis JustasMasiulis changed the title I have an error code MSVC: internal compiler error Nov 5, 2020
@JustasMasiulis
Copy link
Owner

@JustasMasiulis I assume you mean to VS 2019, correct? I'm using Win 10 LTSB (2016) which is not supported by VS 2019, unfortunately.

Yup :(

If you could post what to add to support VS 2017 it would be nice, if you don't want to bother I'd just be missing the recent optimizations, since the previous commit works for me as mentioned, and I'm fine with that too.

I'd suggest to just use that commit then, because functionality wise nothing changed. The problem is that VS 2017 can't handle intrinsics inside of pack expansion so I'd need to copy the parts where intrinsics are used into their own separate function.

@JustasMasiulis JustasMasiulis changed the title MSVC: internal compiler error Visual Studio 2017 support Apr 23, 2021
@JustasMasiulis JustasMasiulis added the wontfix This will not be worked on label Apr 23, 2021
@gurachan
Copy link

the lastest one almost perfectg but it has

xorstr.hpp(189): fatal error C1001: An internal error has occurred in the compiler.
1>(compiler file 'd:\agent\_work\2\s\src\vctools\compiler\cxxfe\sl\p1\c\yyaction.cpp', line 9294)
1> To work around this problem, try simplifying or changing the program near the locations listed above.

i do use the commit for vs2017 above but its kinda exposed

  qmemcpy(SubStr, "garbagetext", 12);
  *(_DWORD *)&SubStr[12] = -392595922;
  v7.m128i_i64[0] = 0xdeedbeef;
  v7.m128i_i64[1] = 0xdeedbeef;
  *(__m128i *)SubStr = _mm_xor_si128(*(__m128i *)SubStr, v7);
  if ( !strstr(v0, SubStr) )

the latest one kinda pog

 v6.m128i_i64[0] = 0xdeedbeef;
  v6.m128i_i64[1] = 0xdeedbeef;
  v13.m128i_i64[0] = 0xdeedbeef;
  v13.m128i_i64[1] = 0xdeedbeef;
  v6 = _mm_xor_si128(v6, v13);
  if ( sub_100037B0(v0, &v6) )

sadly only works on vs2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants