奇怪的BUG
库文件名为WebView2Loader.dll.lib
,在CMake + Mingw环境下出现了无论改为libWebView2Loader
, WebView2Loader
, WebView2Loader.dll.a
都无法找到文件的问题
link_directories(
"${CMAKE_CURRENT_SOURCE_DIR}/libs"
)
target_link_libraries(cppPlay
WebView2Loader.dll.lib
)
解决方法
改为绝对路径可避免
target_link_libraries(cppPlay
"${CMAKE_CURRENT_SOURCE_DIR}/libs/WebView2Loader.dll.lib"
)
环境
cmake version 3.24.1
gcc version 12.2.0 (Rev1, Built by MSYS2 project)
标签:文件,CMake,lib,WebView2Loader,dll,编译器,link,错误处理
From: https://www.cnblogs.com/winterreisender/p/16475872.html