Closed mcuee closed 2 years ago
VS2019 Error messages.
Apparently it is not related to USE_EXTERNAL option, but rather compiler detection. So it is rather strange. Even if I add "-D USE_EXTERNAL=1" as the additional command line option to CMake, it still has the same issues.
1> CMake generation started for configuration: 'x64'.
1> Command line: "C:\WINDOWS\system32\cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A x64 -DCMAKE_CONFIGURATION_TYPES:STRING="RelWithDebInfo" -DCMAKE_INSTALL_PREFIX:PATH="C:\work\avr\vsbuild\out\install\x64" "C:\work\avr\vsbuild" 2>&1"
1> Working directory: C:\work\avr\vsbuild\out\build\x64
1> [CMake] -- Selecting Windows SDK version to target Windows 10.0.19043.
1> [CMake] -- The C compiler identification is unknown
1> [CMake] -- The CXX compiler identification is unknown
1> [CMake] CMake Error at C:\work\avr\vsbuild\CMakeLists.txt:24 (project):
1> [CMake] No CMAKE_C_COMPILER could be found.
1> [CMake]
1> [CMake]
1> [CMake]
1> [CMake] CMake Error at C:\work\avr\vsbuild\CMakeLists.txt:24 (project):
1> [CMake] No CMAKE_CXX_COMPILER could be found.
1> [CMake]
1> [CMake]
1> [CMake]
1> [CMake] -- Configuring incomplete, errors occurred!
1> [CMake] See also "C:/work/avr/vsbuild/out/build/x64/CMakeFiles/CMakeOutput.log".
1> [CMake] See also "C:/work/avr/vsbuild/out/build/x64/CMakeFiles/CMakeError.log".
1> 'C:\WINDOWS\system32\cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A x64 -DCMAKE_CONFIGURATION_TYPES:STRING="RelWithDebInfo" -DCMAKE_INSTALL_PREFIX:PATH="C:\work\avr\vsbuild\out\install\x64" "C:\work\avr\vsbuild" 2>&1"' execution failed with error: ''C:\WINDOWS\system32\cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A x64 -DCMAKE_CONFIGURATION_TYPES:STRING="RelWithDebInfo" -DCMAKE_INSTALL_PREFIX:PATH="C:\work\avr\vsbuild\out\install\x64" "C:\work\avr\vsbuild" 2>&1"' returned with exit code: 1'.
Looks like my VS2019 installation is broken. I will try again later.
Now it is a bit better. Need to figure out the installation of flex and bison.
1> CMake generation started for configuration: 'x64'.
1> Command line: "C:\WINDOWS\system32\cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A x64 -DCMAKE_CONFIGURATION_TYPES:STRING="RelWithDebInfo" -DCMAKE_INSTALL_PREFIX:PATH="C:\work\avr\vsbuild\out\install\x64" -D USE_EXTERNAL=1 "C:\work\avr\vsbuild" 2>&1"
1> Working directory: C:\work\avr\vsbuild\out\build\x64
1> [CMake] -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
1> [CMake] -- The C compiler identification is MSVC 19.29.30143.0
1> [CMake] -- The CXX compiler identification is MSVC 19.29.30143.0
1> [CMake] -- Detecting C compiler ABI info
1> [CMake] -- Detecting C compiler ABI info - done
1> [CMake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting C compile features
1> [CMake] -- Detecting C compile features - done
1> [CMake] -- Detecting CXX compiler ABI info
1> [CMake] -- Detecting CXX compiler ABI info - done
1> [CMake] -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting CXX compile features
1> [CMake] -- Detecting CXX compile features - done
1> [CMake] -- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.35.3.windows.1")
1> [CMake] -- Could NOT find FLEX (missing: FLEX_EXECUTABLE)
1> [CMake] CMake Error at C:\work\avr\vsbuild\CMakeLists.txt:93 (message):
1> [CMake] This CMake project requires 'flex', which is not installed on your system.
1> [CMake]
1> [CMake]
1> [CMake] CMake Error at C:\work\avr\vsbuild\CMakeLists.txt:105 (message):
1> [CMake] This CMake project requires 'bison', 'yacc', or 'byacc', which is not
1> [CMake] installed on your system.
1> [CMake]
1> [CMake]
1> [CMake] -- Fetching external libraries, please wait...
1> [CMake] -- Using external library 'libelf'
1> [CMake] -- Using external library 'libusb'
1> [CMake] -- Using external library 'libhidapi'
1> [CMake] -- Using external library 'libftdi'
1> [CMake] CMake Error at src/CMakeLists.txt:23 (FLEX_TARGET):
1> [CMake] Unknown CMake command "FLEX_TARGET".
1> [CMake]
1> [CMake]
1> [CMake] -- Configuring incomplete, errors occurred!
1> [CMake] See also "C:/work/avr/vsbuild/out/build/x64/CMakeFiles/CMakeOutput.log".
1> [CMake] See also "C:/work/avr/vsbuild/out/build/x64/CMakeFiles/CMakeError.log".
After running choco install winflexbison3
it seems to be okay now.
1> CMake generation started for configuration: 'x64'.
1> Command line: "C:\WINDOWS\system32\cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A x64 -DCMAKE_CONFIGURATION_TYPES:STRING="RelWithDebInfo" -DCMAKE_INSTALL_PREFIX:PATH="C:\work\avr\vsbuild\out\install\x64" -D USE_EXTERNAL=1 "C:\work\avr\vsbuild" 2>&1"
1> Working directory: C:\work\avr\vsbuild\out\build\x64
1> [CMake] -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
1> [CMake] -- Found FLEX: C:/ProgramData/chocolatey/bin/win_flex.exe (found version "2.6.4")
1> [CMake] -- Found BISON: C:/ProgramData/chocolatey/bin/win_bison.exe (found version "3.7.4")
1> [CMake] -- Fetching external libraries, please wait...
1> [CMake] -- Using external library 'libelf'
1> [CMake] -- Using external library 'libusb'
1> [CMake] -- Using external library 'libhidapi'
1> [CMake] -- Using external library 'libftdi'
1> [CMake] -- Configuration summary:
1> [CMake] -- ----------------------
1> [CMake] -- DO HAVE libelf
1> [CMake] -- DO HAVE libusb
1> [CMake] -- DON'T HAVE libusb_1_0
1> [CMake] -- DO HAVE libhidapi
1> [CMake] -- DO HAVE libftdi
1> [CMake] -- DON'T HAVE libftdi1
1> [CMake] -- DISABLED doc
1> [CMake] -- DISABLED parport
1> [CMake] -- DISABLED linuxgpio
1> [CMake] -- DISABLED linuxspi
1> [CMake] -- ----------------------
1> [CMake] -- Configuring done
1> [CMake] -- Generating done
1> [CMake] -- Build files have been written to: C:/work/avr/vsbuild/out/build/x64
1> Extracted CMake variables.
1> Extracted source files and headers.
1> Extracted code model.
1> Extracted toolchain configurations.
1> Extracted includes paths.
1> CMake generation finished.
But the build process failed. Something is still wrong. src\bitbang.c
and src\serbb_posix.c
need to be excluded.
Strange, removing the two files and then adding them back see to fix the issue.
>------ Build All started: Project: vsbuild, Configuration: x64 ------
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
libelf.vcxproj -> C:\work\avr\vsbuild\out\build\x64\_deps\libelf-build\RelWithDebInfo\libelf.lib
libftdi.vcxproj -> C:\work\avr\vsbuild\out\build\x64\_deps\libftdi-build\RelWithDebInfo\libftdi.lib
libhidapi.vcxproj -> C:\work\avr\vsbuild\out\build\x64\_deps\libhidapi-build\RelWithDebInfo\libhidapi.lib
libusb.vcxproj -> C:\work\avr\vsbuild\out\build\x64\_deps\libusb-build\RelWithDebInfo\libusb.lib
serbb_posix.c
libavrdude.vcxproj -> C:\work\avr\vsbuild\out\build\x64\src\RelWithDebInfo\libavrdude.lib
avrdude.vcxproj -> C:\work\avr\vsbuild\out\build\x64\src\RelWithDebInfo\avrdude.exe
Build All succeeded.
Restart the whole thing again and everything is okay.
1> CMake generation started for configuration: 'x64-Debug'.
1> Command line: "C:\WINDOWS\system32\cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\work\avr\vs2019build\out\install\x64-Debug" -DUSE_EXTERNAL:BOOL="True" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "C:\work\avr\vs2019build" 2>&1"
1> Working directory: C:\work\avr\vs2019build\out\build\x64-Debug
1> [CMake] -- Fetching external libraries, please wait...
1> [CMake] -- Using external library 'libelf'
1> [CMake] -- Using external library 'libusb'
1> [CMake] -- Using external library 'libhidapi'
1> [CMake] -- Using external library 'libftdi'
1> [CMake] -- Configuration summary:
1> [CMake] -- ----------------------
1> [CMake] -- DO HAVE libelf
1> [CMake] -- DO HAVE libusb
1> [CMake] -- DON'T HAVE libusb_1_0
1> [CMake] -- DO HAVE libhidapi
1> [CMake] -- DO HAVE libftdi
1> [CMake] -- DON'T HAVE libftdi1
1> [CMake] -- DISABLED doc
1> [CMake] -- DISABLED parport
1> [CMake] -- DISABLED linuxgpio
1> [CMake] -- DISABLED linuxspi
1> [CMake] -- ----------------------
1> [CMake] -- Configuring done
1> [CMake] -- Generating done
1> [CMake] -- Build files have been written to: C:/work/avr/vs2019build/out/build/x64-Debug
1> Extracted CMake variables.
1> Extracted source files and headers.
1> Extracted code model.
1> Extracted toolchain configurations.
1> Extracted includes paths.
1> CMake generation finished.
>------ Build All started: Project: vs2019build, Configuration: x64-Debug ------
[1/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\32.getshdr.c.obj
[2/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\cook.c.obj
[3/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\assert.c.obj
[4/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\cntl.c.obj
[5/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\begin.c.obj
[6/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\errmsg.c.obj
[7/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\64.xlatetof.c.obj
[8/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\32.getehdr.c.obj
[9/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\32.xlatetof.c.obj
[10/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\32.newehdr.c.obj
[11/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\checksum.c.obj
[12/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\32.getphdr.c.obj
[13/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\32.fsize.c.obj
[14/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\32.newphdr.c.obj
[15/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\data.c.obj
[16/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\getaroff.c.obj
[17/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\fill.c.obj
[18/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\gelfphdr.c.obj
[19/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\getdata.c.obj
[20/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\flag.c.obj
[21/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\gelfshdr.c.obj
[22/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\getarsym.c.obj
[23/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\end.c.obj
[24/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\getarhdr.c.obj
[25/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\getbase.c.obj
[26/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\errno.c.obj
[27/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\memset.c.obj
[28/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\gelfehdr.c.obj
[29/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\gelftrans.c.obj
[30/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\getident.c.obj
[31/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\kind.c.obj
[32/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\getscn.c.obj
[33/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\newscn.c.obj
[34/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\hash.c.obj
[35/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\ndxscn.c.obj
[36/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\newdata.c.obj
[37/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\nextscn.c.obj
[38/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\input.c.obj
[39/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\next.c.obj
[40/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\nlist.c.obj
[41/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\rawdata.c.obj
[42/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\opt.delscn.c.obj
[43/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\rand.c.obj
[44/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\strptr.c.obj
[45/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\swap64.c.obj
[46/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\x.movscn.c.obj
[47/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\x.remscn.c.obj
[48/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\rawfile.c.obj
[49/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\verdef_32_tom.c.obj
[50/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\version.c.obj
[51/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\verdef_64_tom.c.obj
[52/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\update.c.obj
[53/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\verdef_32_tof.c.obj
[54/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\x.elfext.c.obj
[55/131] Building C object _deps\libelf-build\CMakeFiles\libelf.dir\src\verdef_64_tof.c.obj
[56/131] Building C object _deps\libusb-build\CMakeFiles\libusb.dir\src\usb.c.obj
[57/131] Building C object _deps\libusb-build\CMakeFiles\libusb.dir\src\descriptors.c.obj
[58/131] Linking C static library _deps\libelf-build\libelf.lib
[59/131] Building CXX object _deps\libftdi-build\CMakeFiles\libftdi.dir\src\ftdi.cpp.obj
[60/131] Linking CXX static library _deps\libftdi-build\libftdi.lib
[61/131] Building CXX object _deps\libusb-build\CMakeFiles\libusb.dir\src\windows.cpp.obj
[62/131] Building C object _deps\libusb-build\CMakeFiles\libusb.dir\src\error.c.obj
[63/131] Building C object _deps\libhidapi-build\CMakeFiles\libhidapi.dir\src\hid.c.obj
[64/131] Building C object _deps\libusb-build\CMakeFiles\libusb.dir\src\registry.c.obj
[65/131] Linking C static library _deps\libhidapi-build\libhidapi.lib
[66/131] Linking CXX static library _deps\libusb-build\libusb.lib
[67/131] [FLEX][Parser] Building scanner with win_flex 2.6.4
[68/131] [BISON][Parser] Building parser with bison 3.7.4
[69/131] Building C object src\CMakeFiles\libavrdude.dir\crc16.c.obj
[70/131] Building C object src\CMakeFiles\libavrdude.dir\arduino.c.obj
[71/131] Building C object src\CMakeFiles\libavrdude.dir\config.c.obj
[72/131] Building C object src\CMakeFiles\libavrdude.dir\dfu.c.obj
[73/131] Building C object src\CMakeFiles\libavrdude.dir\avr910.c.obj
[74/131] Building C object src\CMakeFiles\libavrdude.dir\buspirate.c.obj
[75/131] Building C object src\CMakeFiles\libavrdude.dir\avr.c.obj
[76/131] Building C object src\CMakeFiles\libavrdude.dir\avrftdi_tpi.c.obj
[77/131] Building C object src\CMakeFiles\libavrdude.dir\avrftdi.c.obj
[78/131] Building C object src\CMakeFiles\libavrdude.dir\avrpart.c.obj
[79/131] Building C object src\CMakeFiles\libavrdude.dir\butterfly.c.obj
[80/131] Building C object src\CMakeFiles\libavrdude.dir\fileio.c.obj
[81/131] Building C object src\CMakeFiles\libavrdude.dir\flip2.c.obj
[82/131] Building C object src\CMakeFiles\libavrdude.dir\lists.c.obj
[83/131] Building C object src\CMakeFiles\libavrdude.dir\linuxgpio.c.obj
[84/131] Building C object src\CMakeFiles\libavrdude.dir\flip1.c.obj
[85/131] Building C object src\CMakeFiles\libavrdude.dir\ft245r.c.obj
[86/131] Building C object src\CMakeFiles\libavrdude.dir\linuxspi.c.obj
[87/131] Building C object src\CMakeFiles\libavrdude.dir\jtagmkI.c.obj
[88/131] Building C object src\CMakeFiles\libavrdude.dir\jtag3.c.obj
[89/131] Building C object src\CMakeFiles\libavrdude.dir\serbb_posix.c.obj
[90/131] Building C object src\CMakeFiles\libavrdude.dir\pindefs.c.obj
[91/131] Building C object src\CMakeFiles\libavrdude.dir\micronucleus.c.obj
[92/131] Building C object src\CMakeFiles\libavrdude.dir\ppi.c.obj
[93/131] Building C object src\CMakeFiles\libavrdude.dir\ser_posix.c.obj
[94/131] Building C object src\CMakeFiles\libavrdude.dir\jtagmkII.c.obj
[95/131] Building C object src\CMakeFiles\libavrdude.dir\pgm_type.c.obj
[96/131] Building C object src\CMakeFiles\libavrdude.dir\par.c.obj
[97/131] Building C object src\CMakeFiles\libavrdude.dir\pgm.c.obj
[98/131] Building C object src\CMakeFiles\libavrdude.dir\ser_avrdoper.c.obj
[99/131] Building C object src\CMakeFiles\libavrdude.dir\ppiwin.c.obj
[100/131] Building C object src\CMakeFiles\libavrdude.dir\bitbang.c.obj
[101/131] Building C object src\CMakeFiles\libavrdude.dir\stk500.c.obj
[102/131] Building C object src\CMakeFiles\libavrdude.dir\serialupdi.c.obj
[103/131] Building C object src\CMakeFiles\libavrdude.dir\confwin.c.obj
[104/131] Building C object src\CMakeFiles\libavrdude.dir\stk500v2.c.obj
[105/131] Building C object src\CMakeFiles\libavrdude.dir\stk500generic.c.obj
[106/131] Building C object src\CMakeFiles\libavrdude.dir\updi_link.c.obj
[107/131] Building C object src\CMakeFiles\libavrdude.dir\teensy.c.obj
[108/131] Building C object src\CMakeFiles\libavrdude.dir\updi_nvm.c.obj
[109/131] Building C object src\CMakeFiles\libavrdude.dir\updi_readwrite.c.obj
[110/131] Building C object src\CMakeFiles\libavrdude.dir\updi_state.c.obj
[111/131] Building C object src\CMakeFiles\libavrdude.dir\usb_libusb.c.obj
[112/131] Building C object src\CMakeFiles\libavrdude.dir\update.c.obj
[113/131] Building C object src\CMakeFiles\libavrdude.dir\usb_hidapi.c.obj
[114/131] Building C object src\CMakeFiles\libavrdude.dir\usbtiny.c.obj
[115/131] Building C object src\CMakeFiles\libavrdude.dir\wiring.c.obj
[116/131] Building C object src\CMakeFiles\libavrdude.dir\usbasp.c.obj
[117/131] Building C object src\CMakeFiles\libavrdude.dir\xbee.c.obj
[118/131] Building C object src\CMakeFiles\libavrdude.dir\__\lexer.c.obj
[119/131] Building C object src\CMakeFiles\libavrdude.dir\__\config_gram.c.obj
[120/131] Building C object src\CMakeFiles\avrdude.dir\main.c.obj
[121/131] Building C object src\CMakeFiles\libavrdude.dir\serbb_win32.c.obj
[122/131] Building RC object src\CMakeFiles\avrdude.dir\windows.rc.res
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Copyright (C) Microsoft Corporation. All rights reserved.
[123/131] Building C object src\CMakeFiles\avrdude.dir\term.c.obj
[124/131] Building C object src\CMakeFiles\libavrdude.dir\pickit2.c.obj
[125/131] Building C object src\CMakeFiles\libavrdude.dir\ser_win32.c.obj
[126/131] Building CXX object src\CMakeFiles\avrdude.dir\msvc\usleep.cpp.obj
[127/131] Linking CXX static library src\libavrdude.lib
[128/131] Building C object src\CMakeFiles\avrdude.dir\msvc\gettimeofday.c.obj
[129/131] Building C object src\CMakeFiles\avrdude.dir\msvc\getopt.c.obj
[130/131] Building C object src\CMakeFiles\avrdude.dir\whereami.c.obj
[131/131] Linking CXX executable src\avrdude.exe
Build All succeeded.
But once the option to build sharedlib, the build will fail. Looks like the issue is the same as MSYS2 MinGW32/64 build. https://github.com/avrdudes/avrdude/issues/952#issuecomment-1120810691
I am trying to build avrdude by following the instruction which seems to be very different from other projects I know of (hidapi, libftdi, libuvc, etc). https://github.com/avrdudes/avrdude/wiki/Building-AVRDUDE-for-Windows-using-Visual-Studio
No issues in the first three steps. But I can not find the CMake option USE_EXTERNAL. 4) Set the CMake option USE_EXTERNAL to True by checking the Value checkbox.
Sorry that I may miss something obvious as I have not really used CMake inside VS.
Motivation: I prefer to use dynamic link with libusb, libftdi and hidapi. As a tester I routinely test libusb, libftdi and hidapi git head under different OS and different compilers, so it is much more convenient for me to use dynamic link.