aws-samples / aws-iot-securetunneling-localproxy

AWS Iot Secure Tunneling local proxy reference C++ implementation
https://docs.aws.amazon.com/iot/latest/developerguide/what-is-secure-tunneling.html
Apache License 2.0
74 stars 71 forks source link

Windows Build Instructions #35

Closed asagage closed 3 years ago

asagage commented 3 years ago

Can you please revise the windows build instructions so that users may more easily compile a windows binary? I'm not sure how to get this working for a windows build.

zhhz commented 3 years ago

Yup, agree with @asagage, I got stuck on rebuilding zlib. Here are some of the errors:

Linking C executable cmTC_add9f.exe "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_add9f.dir --rc="C:\PROGRA~2\Windows Kits\10\bin\10.0.18362.0\x86\rc.exe" --mt="C:\PROGRA~2\Windows Kits\10\bin\10.0.18362.0\x86\mt.exe" --manifests -- C:\Strawberry\c\bin\ld.exe /nologo @CMakeFiles\cmTC_add9f.dir\objects1.rsp @C:\Users\ZZuo\AppData\Local\Temp\nmF813.tmp LINK Pass 1: command "C:\Strawberry\c\bin\ld.exe /nologo @CMakeFiles\cmTC_add9f.dir\objects1.rsp /out:cmTC_add9f.exe /implib:cmTC_add9f.lib /pdb:C:\Users\ZZuo\Projects\zlib\build\CMakeFiles\CMakeTmp\cmTC_add9f.pdb /version:0.0 /machine:X86 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_add9f.dir/intermediate.manifest CMakeFiles\cmTC_add9f.dir/manifest.res" failed (exit code 1) with the following output: C:\Strawberry\c\bin\ld.exe: cannot find /nologo: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find /out:cmTC_add9f.exe: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find /implib:cmTC_add9f.lib: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find /pdb:C:\Users\ZZuo\Projects\zlib\build\CMakeFiles\CMakeTmp\cmTC_add9f.pdb: Invalid argument C:\Strawberry\c\bin\ld.exe: cannot find /version:0.0: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find /machine:X86: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find /debug: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find /INCREMENTAL: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find /subsystem:console: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find kernel32.lib: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find user32.lib: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find gdi32.lib: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find winspool.lib: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find shell32.lib: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find ole32.lib: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find oleaut32.lib: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find uuid.lib: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find comdlg32.lib: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find advapi32.lib: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find /MANIFEST: No such file or directory C:\Strawberry\c\bin\ld.exe: cannot find /MANIFESTFILE:CMakeFiles\cmTC_add9f.dir/intermediate.manifest: Invalid argument CMakeFiles\cmTC_add9f.dir/manifest.res: file not recognized: file format not recognized NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return code '0xffffffff' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX86\x86\nmake.exe"' : return code '0x2' Stop.

kareali commented 3 years ago

@asagage Could you specify which step is causing an error and provide the full build log?

kareali commented 3 years ago

@zhhz Seems that your windows SDK is broken and missing some files like machine:X86 or advapi32.lib. Please repair your windows installation and try again.

kareali commented 3 years ago

I'm closing the ticket since It's been a while and I didn't get any response, please feel free to open a new issue if you're still having problems with windows compilation.