[GH-ISSUE #1978] Build error on windows - mingw 15.2 - Qt 6.7 #861

Open
opened 2026-10-13 20:30:04 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @s7bc on GitHub (Nov 9, 2025).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/1978

git clone https://github.com/amnezia-vpn/amnezia-client.git
cd .\amnezia-client
git submodule update --init --recursive
mkdir build
cd build
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="......Qt\6.7.3\mingw_64" ..

T:\amnezia-client\client\protocols\ikev2_vpn_protocol_windows.cpp: In member function 'bool Ikev2Protocol::create_new_vpn(const QString&, const QString&)':
T:\amnezia-client\client\protocols\ikev2_vpn_protocol_windows.cpp:273:39: error: 'RASNP_Ipv6' was not declared in this scope; did you mean 'RASNP_Ip'?
  273 |     pras->dwfNetProtocols =  RASNP_Ip|RASNP_Ipv6;
      |                                       ^~~~~~~~~~
      |                                       RASNP_Ip
T:\amnezia-client\client\protocols\ikev2_vpn_protocol_windows.cpp:279:26: error: 'RASEO2_RequireMachineCertificates' was not declared in this scope
  279 |     pras->dwfOptions2 |= RASEO2_RequireMachineCertificates;
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
T:\amnezia-client\client\protocols\ikev2_vpn_protocol_windows.cpp:280:27: error: 'VS_Ikev2Only' was not declared in this scope
  280 |     pras->dwVpnStrategy = VS_Ikev2Only;
      |                           ^~~~~~~~~~~~
T:\amnezia-client\client\protocols\ikev2_vpn_protocol_windows.cpp: In member function 'bool Ikev2Protocol::connect_to_vpn(const QString&)':
T:\amnezia-client\client\protocols\ikev2_vpn_protocol_windows.cpp:302:24: error: invalid conversion from 'void (*)(UINT, tagRASCONNSTATE, DWORD)' {aka 'void (*)(unsigned int, tagRASCONNSTATE, long unsigned int)'} to 'LPVOID' {aka 'void*'} [-fpermissive]
  302 |                        &RasDialFuncCallback,
      |                        ^~~~~~~~~~~~~~~~~~~~
      |                        |
      |                        void (*)(UINT, tagRASCONNSTATE, DWORD) {aka void (*)(unsigned int, tagRASCONNSTATE, long unsigned int)}
In file included from T:\amnezia-client\client\protocols\ikev2_vpn_protocol_windows.h:23,
                 from T:\amnezia-client\client\protocols\ikev2_vpn_protocol_windows.cpp:10:
P:/GCC/x86_64-w64-mingw32/include/ras.h:846:76: note: initializing argument 5 of 'DWORD RasDialW(tagRASDIALEXTENSIONS*, LPCWSTR, tagRASDIALPARAMSW*, DWORD, LPVOID, HRASCONN__**)'
  846 |   DWORD WINAPI RasDialW(LPRASDIALEXTENSIONS,LPCWSTR,LPRASDIALPARAMSW,DWORD,LPVOID,LPHRASCONN);
      |                                                                            ^~~~~~
make[2]: *** [client\CMakeFiles\AmneziaVPN.dir\build.make:15956: client/CMakeFiles/AmneziaVPN.dir/protocols/ikev2_vpn_protocol_windows.cpp.obj] Error 1
make[1]: *** [CMakeFiles\Makefile2:226: client/CMakeFiles/AmneziaVPN.dir/all] Error 2
make: *** [Makefile:135: all] Error 2```
Originally created by @s7bc on GitHub (Nov 9, 2025). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/1978 git clone https://github.com/amnezia-vpn/amnezia-client.git cd .\amnezia-client\ git submodule update --init --recursive mkdir build cd build cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="......Qt\6.7.3\mingw_64" .. ```[ 70%] Building CXX object client/CMakeFiles/AmneziaVPN.dir/protocols/ikev2_vpn_protocol_windows.cpp.obj T:\amnezia-client\client\protocols\ikev2_vpn_protocol_windows.cpp: In member function 'bool Ikev2Protocol::create_new_vpn(const QString&, const QString&)': T:\amnezia-client\client\protocols\ikev2_vpn_protocol_windows.cpp:273:39: error: 'RASNP_Ipv6' was not declared in this scope; did you mean 'RASNP_Ip'? 273 | pras->dwfNetProtocols = RASNP_Ip|RASNP_Ipv6; | ^~~~~~~~~~ | RASNP_Ip T:\amnezia-client\client\protocols\ikev2_vpn_protocol_windows.cpp:279:26: error: 'RASEO2_RequireMachineCertificates' was not declared in this scope 279 | pras->dwfOptions2 |= RASEO2_RequireMachineCertificates; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ T:\amnezia-client\client\protocols\ikev2_vpn_protocol_windows.cpp:280:27: error: 'VS_Ikev2Only' was not declared in this scope 280 | pras->dwVpnStrategy = VS_Ikev2Only; | ^~~~~~~~~~~~ T:\amnezia-client\client\protocols\ikev2_vpn_protocol_windows.cpp: In member function 'bool Ikev2Protocol::connect_to_vpn(const QString&)': T:\amnezia-client\client\protocols\ikev2_vpn_protocol_windows.cpp:302:24: error: invalid conversion from 'void (*)(UINT, tagRASCONNSTATE, DWORD)' {aka 'void (*)(unsigned int, tagRASCONNSTATE, long unsigned int)'} to 'LPVOID' {aka 'void*'} [-fpermissive] 302 | &RasDialFuncCallback, | ^~~~~~~~~~~~~~~~~~~~ | | | void (*)(UINT, tagRASCONNSTATE, DWORD) {aka void (*)(unsigned int, tagRASCONNSTATE, long unsigned int)} In file included from T:\amnezia-client\client\protocols\ikev2_vpn_protocol_windows.h:23, from T:\amnezia-client\client\protocols\ikev2_vpn_protocol_windows.cpp:10: P:/GCC/x86_64-w64-mingw32/include/ras.h:846:76: note: initializing argument 5 of 'DWORD RasDialW(tagRASDIALEXTENSIONS*, LPCWSTR, tagRASDIALPARAMSW*, DWORD, LPVOID, HRASCONN__**)' 846 | DWORD WINAPI RasDialW(LPRASDIALEXTENSIONS,LPCWSTR,LPRASDIALPARAMSW,DWORD,LPVOID,LPHRASCONN); | ^~~~~~ make[2]: *** [client\CMakeFiles\AmneziaVPN.dir\build.make:15956: client/CMakeFiles/AmneziaVPN.dir/protocols/ikev2_vpn_protocol_windows.cpp.obj] Error 1 make[1]: *** [CMakeFiles\Makefile2:226: client/CMakeFiles/AmneziaVPN.dir/all] Error 2 make: *** [Makefile:135: all] Error 2```
Author
Owner

@TURRET14 commented on GitHub (Nov 10, 2025):

Use MSVC Compiler

<!-- gh-comment-id:3513743805 --> @TURRET14 commented on GitHub (Nov 10, 2025): Use MSVC Compiler
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#861
No description provided.