I'm having troubles with compiling open source projects with VSCode

14 Views Asked by At

I have been studying open source projects for myself. I have troubles in building real executable files. For example, 'goodbyedpi.c' has dependency on 'windivert.h' from 'windivert' and 'in6addr.h' from 'winsdk'. https://github.com/ValdikSS/GoodbyeDPI

/*
 * GoodbyeDPI — Passive DPI blocker and Active DPI circumvention utility.
 */
#include <in6addr.h>
#include <ws2tcpip.h>
#include "windivert.h"
...

So, I downloaded 'winsdk' from github and placed in same directory which contains GoodbyeDPI folder. However, error occurs from line 600 of goodbyedpi.c, there's undefined 'BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE' macro variable.

I searched where 'BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE' is defined and I found it in 'WinBase.h' from winsdk source files. So I wrote at the top of 'goodbyedpi.c'

#include <./../../winsdk-10/include/10.0.10240.0/um/WinBase.h>

then it occurs another errors that from line 138, 'variable "HANDLE" is not a type nameC/C++(757)'. I found that HANDLE is originally defined from 'winnt.h' in MinGW folder. I can't find out why addition of 'WinBase.h' makes variable 'HANDLE' not working. I want to know why my insertion doesn't work and how to compile this source code well. Thank you.

0

There are 0 best solutions below