Last active
May 29, 2024 16:30
-
-
Save hack-tramp/b19b7675670bb5463bb763c602b5bc05 to your computer and use it in GitHub Desktop.
How to compile AVRA with MS Visual Studio 2019
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to compile AVRA https://github.com/Ro5bert/avra | |
with MS Visual Studio 2019 | |
New Project > Console Application > C++ | |
(create it empty without any files) | |
Import all .c and .h files from AVRA src folder | |
In file.c, you will need to change line | |
#include <unistd.h> into: | |
#include "unistd.h" | |
Add unistd.h to the project from https://stackoverflow.com/questions/341817/is-there-a-replacement-for-unistd-h-for-windows-visual-c#826027 | |
In unistd.h change line | |
#include <getopt.h> to : | |
#include "getopt.h" | |
Add getopt.h to the project from https://gist.github.com/ashelly/7776712 | |
To suppress C4996 errors: | |
Right click on your project, go to properties | |
Configuration Properties > C/C++ > Preprocessor | |
Add these (separated by semicolons) to Preprocessor Definitions: | |
_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE; | |
see here for details: https://stackoverflow.com/questions/16883037/remove-secure-warnings-crt-secure-no-warnings-from-projects-by-default-in-vis#20753468 | |
Compile! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment