Я получаю это в процессе компоновки моего проекта (компилируется с помощью cmake):
[100%] Linking CXX executable roosek2.exe
/usr/lib/gcc/x86_64-pc-msys/9.1.0/../../../../x86_64-pc-msys/bin/ld: cannot find -lC:/msys64/mingw64/lib/libz.dll.a
/usr/lib/gcc/x86_64-pc-msys/9.1.0/../../../../x86_64-pc-msys/bin/ld: cannot find -lC:/msys64/mingw64/lib/libssl.dll.a
/usr/lib/gcc/x86_64-pc-msys/9.1.0/../../../../x86_64-pc-msys/bin/ld: cannot find -lC:/msys64/mingw64/lib/libcrypto.dll.a
/usr/lib/gcc/x86_64-pc-msys/9.1.0/../../../../x86_64-pc-msys/bin/ld: cannot find -lC:/msys64/mingw64/lib/libzstd.dll.a
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/roosek2.dir/build.make:578: roosek2.exe] Error 1
make[2]: Leaving directory '/home/LZ/roosek_ocr2'
make[1]: *** [CMakeFiles/Makefile2:77: CMakeFiles/roosek2.dir/all] Error 2
make[1]: Leaving directory '/home/LZ/roosek_ocr2'
make: *** [Makefile:84: all] Error 2
Это происходит, когда я компилирую с помощью stati c qt5 из MSYS2 в оболочке MinGW. Вот мой CMakeLists.txt:
cmake_minimum_required(VERSION 3.5)
project(roosek2 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt5 COMPONENTS Core Quick REQUIRED)
add_executable(roosek2
main.cpp
qml.qrc
ImageStream.cpp
YuvUtils.cpp
CameraView.cpp
)
add_library(ctmedia_codec MODULE IMPORTED)
add_library(ctstream MODULE IMPORTED)
add_library(maincore MODULE IMPORTED)
#link_directories(${CMAKE_CURRENT_SOURCE_DIR}/win_bin/lib/x64)
set_target_properties(ctmedia_codec PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/win_bin/lib/x64/CTMedia.lib)
set_target_properties(ctstream PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/win_bin/lib/x64/CTStream.lib)
set_target_properties(maincore PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/win_bin/lib/x64/WPMainCore.lib)
include_directories("include")
target_compile_definitions(roosek2
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
target_link_libraries(roosek2
PRIVATE Qt5::Core Qt5::Quick ctmedia_codec ctstream maincore)
Как мне установить эти библиотеки? Почему они требуются? Они действительно нужны мне?