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

Unable to compile on VS 2019 #4

Open
lizardpeter opened this issue Oct 7, 2020 · 5 comments
Open

Unable to compile on VS 2019 #4

lizardpeter opened this issue Oct 7, 2020 · 5 comments

Comments

@lizardpeter
Copy link

I seem to be unable to compile this. It could be user error, but could you take a look at it?

@T-vK
Copy link
Owner

T-vK commented Oct 7, 2020

What did you try? What errors are you getting?

@lizardpeter
Copy link
Author

lizardpeter commented Oct 7, 2020

  • It could not find #include "stdafx.h"

  • Identifier Memory is undefined

  • I had to rename Memory.hpp to Memory.h, but it's still not working

  • Identifier cin is undefined

  • 'BOOL SetConsoleTitleW(LPCWSTR)': cannot convert argument 1 from 'const char [18]' to 'LPCWSTR' when trying to set console title

  • Return value does not match function type

  • Argument of type "char *" is incompatible with parameter of type "LPWSTR"

I haven't really tried to do anything with it. I am just trying to get the code and your example to run.

@T-vK
Copy link
Owner

T-vK commented Oct 7, 2020

Are these errors or warnings?

Try this: https://social.msdn.microsoft.com/Forums/en-US/3f9c5979-0a63-4724-9e31-8beab7a0462b/why-there-is-no-stdafxh-and-targetverh-in-visual-studio-c-2017?forum=visualstudiogeneral
stdafx.h is just the precompiled headers provided by Visual Studio.

Try to fix that issue and the other ones may just go away.

I can't really help you too much with this as I don't use Windows anymore.

If you can't get it to work with Visual Studio 2019, maybe try an older version or use gcc with the gcc branch: https://github.com/T-vK/Memory-Hacking-Class/tree/gcc

@lizardpeter
Copy link
Author

Thanks. I'll try that in a little while and report back.

@SnoopyDevelops
Copy link

SnoopyDevelops commented Nov 5, 2020

In vs2019, I added precompiled headers by using windows desktop wizard and replaced "stdafx.h" with "pch.h".
After that I included iosteam to solve cin, cout error.
Still I have argument type errors and return type error.
In vs2017, return type error has gone, but still I have argument type error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants