From d9353d1684a6aaff804e484c4e833e3c8ed1055d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Mon, 6 Feb 2023 19:30:43 +0000 Subject: [PATCH] Fix MSYS2 build Fix: ``` FAILED: run/extcap/randpktdump.exe cmd.exe /C "cd . && D:\a\_temp\msys64\ucrt64\bin\gcc.exe -fvisibility=hidden -Wall -Wextra -Wpointer-arith -Wformat-security -fno-strict-overflow -fexcess-precision=fast -Wvla -Wattributes -Wpragmas -Wredundant-decls -Wunreachable-code -Wlogical-op -Wno-error=stringop-overflow= -Wno-error=deprecated-declarations -Wframe-larger-than=32768 -Wno-format-truncation -fdiagnostics-color=always -Wshadow -Wold-style-definition -Wstrict-prototypes -Wno-pointer-sign -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -fmacro-prefix-map=D:/a/wireshark/wireshark/build/src/wireshark/= -fmacro-prefix-map=D:/a/wireshark/wireshark/build/src/build-UCRT64/= -O3 -DNDEBUG -pipe -Wl,--as-needed -municode CMakeFiles/cli_main.dir/cli_main.c.obj extcap/CMakeFiles/extcap-base.dir/extcap-base.c.obj extcap/CMakeFiles/randpktdump.dir/randpktdump.c.obj extcap/CMakeFiles/randpktdump.dir/__/resources/randpktdump.rc.obj -o run\extcap\randpktdump.exe -Wl,--out-implib,run\librandpktdump.dll.a -Wl,--major-image-version,0,--minor-image-version,0 run/librandpkt_core.a run/libwiretap.dll.a -lws2_32 run/libui.a run/libwsutil.dll.a D:/a/_temp/msys64/ucrt64/lib/libglib-2.0.dll.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ." D:/a/_temp/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: run/libui.a(failure_message.c.obj):failure_messag:(.text+0x129): undefined reference to `__imp_wtap_strerror' ``` After this change: ``` [2177/2600] Linking C executable run/dumpcap Warning: Unused direct dependencies: /usr/lib/libnl-route-3.so.200 /home/jpv/code/wireshark/devel/build/run/libwiretap.so.0 ``` --- ui/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/CMakeLists.txt b/ui/CMakeLists.txt index e37200f992..fd0021dbe0 100644 --- a/ui/CMakeLists.txt +++ b/ui/CMakeLists.txt @@ -80,6 +80,7 @@ add_library(ui STATIC ${UI_SRC}) target_link_libraries(ui PRIVATE wsutil + wiretap ) target_include_directories(ui