'C++ Compile Fix

I'm trying to compile this tool https://github.com/Meltedd/HVNC

but when I do g++ Server.cpp I get the error

In file included from Server.h:1,
                 from Server.cpp:1:
Common.h:1: warning: `#pragma once' is obsolete
Server.cpp:5: `NTAPI' was not declared in this scope
Server.cpp:5: `T_RtlDecompressBuffer' was not declared in this scope
Server.cpp:13: warning: ANSI C++ forbids typedef which does not specify a type
Server.cpp:13: typedef declaration includes an initializer
[main] C:\cygnus\cygwin-b20\H-i586-cygwin32\bin\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\cc1plus.exe 1002 (0) handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
[main] cc1plus 1002 (0) handle_exceptions: Dumping stack trace to cc1plus.exe.core

when I try g++ HiddenDesktop.cpp I get the error

In file included from HiddenDesktop.cpp:1:
HiddenDesktop.h:1: warning: `#pragma once' is obsolete
In file included from HiddenDesktop.h:2,
                 from HiddenDesktop.cpp:1:
../common/Common.h:1: warning: `#pragma once' is obsolete
In file included from HiddenDesktop.h:2,
                 from HiddenDesktop.cpp:1:
../common/Common.h:9: Security.h: No such file or directory
../common/Common.h:10: Sddl.h: No such file or directory
../common/Common.h:11: Shlwapi.h: No such file or directory
../common/Common.h:12: Shlobj.h: No such file or directory
../common/Common.h:13: TlHelp32.h: No such file or directory
../common/Common.h:14: Psapi.h: No such file or directory
../common/Common.h:15: Wininet.h: No such file or directory
../common/Common.h:16: Urlmon.h: No such file or directory
In file included from ../common/Common.h:17,
                 from HiddenDesktop.h:2,
                 from HiddenDesktop.cpp:1:
../common/Api.h:1: warning: `#pragma once' is obsolete
In file included from ../common/Common.h:18,
                 from HiddenDesktop.h:2,
                 from HiddenDesktop.cpp:1:
../common/Utils.h:1: warning: `#pragma once' is obsolete
In file included from ../common/Common.h:19,
                 from HiddenDesktop.h:2,
                 from HiddenDesktop.cpp:1:
../common/Inject.h:1: warning: `#pragma once' is obsolete
In file included from ../common/Common.h:20,
                 from HiddenDesktop.h:2,
                 from HiddenDesktop.cpp:1:
../common/HTTP.h:1: warning: `#pragma once' is obsolete
HiddenDesktop.cpp:5: Tlhelp32.h: No such file or directory
HiddenDesktop.cpp:8: gdiplus.h: No such file or directory

and Finally when I try g++ Server.cpp I get the error

In file included from Server.h:1,
                 from Server.cpp:1:
Common.h:1: warning: `#pragma once' is obsolete
Server.cpp:5: `NTAPI' was not declared in this scope
Server.cpp:5: `T_RtlDecompressBuffer' was not declared in this scope
Server.cpp:13: warning: ANSI C++ forbids typedef which does not specify a type
Server.cpp:13: typedef declaration includes an initializer
[main] C:\cygnus\cygwin-b20\H-i586-cygwin32\bin\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\cc1plus.exe 1002 (0) handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
[main] cc1plus 1002 (0) handle_exceptions: Dumping stack trace to cc1plus.exe.core

I have also tried the sln file bu there I get the error

Not possible to iniciate the program '...\Win32\Server.exe' systeam could not locate the specified path

I'm using VS2022

I don't know what can I be doing wron or what can be missing here

I have tried compiling with g++ and vs2022

c++


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source