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
```
This commit is contained in:
João Valverde 2023-02-06 19:30:43 +00:00
parent 0c0f731c92
commit d9353d1684
1 changed files with 1 additions and 0 deletions

View File

@ -80,6 +80,7 @@ add_library(ui STATIC ${UI_SRC})
target_link_libraries(ui
PRIVATE
wsutil
wiretap
)
target_include_directories(ui