Skip to content

Build error on windows - mingw 15.2 - Qt 6.7 #1978

@ljgdasfhk

Description

@ljgdasfhk

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```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions