You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using lunasvg to process svg images for my project. I compile it with cmake.
When I use FetchContent given in the Readme to include, the project compiles normally. When I pre-compile lunasvg, I get two folders, include and lib. And link it to my project, but "error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall lunasvg::Bitmap::~Bitmap(void)"" appears
Can you give me some advice on how to link lunasvg with cmake? I don't know much about this.
This is my cmake link command:
include_directories(${CMAKE_CURRENT_LIST_DIR}/include/lunasvg)
include_directories(${CMAKE_CURRENT_LIST_DIR}/include/plutovg)
set(lunasvg_lib_DIR ${CMAKE_CURRENT_LIST_DIR}/lib)
link_directories(${lunasvg_lib_DIR})
By the way, I compiled lunasvg in Release form on Windows, like this:
git clone https://github.com/sammycage/lunasvg.git
cd lunasvg
cmake -B build -DCMAKE_INSTALL_PREFIX="C:/Users/ins/Desktop/oto/plutosvg/install" -DCMAKE_BUILD_TYPE=Release -DCMAKE_GENERATOR_TOOLSET=v142 -A Win32 -DCMAKE_SYSTEM_VERSION=8.1 cmake --build build --config Release cmake --install build
I found that the lib folder only has .lib files but no .dll files. Is this the reason?
The text was updated successfully, but these errors were encountered:
I am using lunasvg to process svg images for my project. I compile it with cmake.
When I use FetchContent given in the Readme to include, the project compiles normally. When I pre-compile lunasvg, I get two folders, include and lib. And link it to my project, but "error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall lunasvg::Bitmap::~Bitmap(void)"" appears
Can you give me some advice on how to link lunasvg with cmake? I don't know much about this.
This is my cmake link command:
include_directories(${CMAKE_CURRENT_LIST_DIR}/include/lunasvg)
include_directories(${CMAKE_CURRENT_LIST_DIR}/include/plutovg)
set(lunasvg_lib_DIR ${CMAKE_CURRENT_LIST_DIR}/lib)
link_directories(${lunasvg_lib_DIR})
By the way, I compiled lunasvg in Release form on Windows, like this:
git clone https://github.com/sammycage/lunasvg.git
cd lunasvg
cmake -B build -DCMAKE_INSTALL_PREFIX="C:/Users/ins/Desktop/oto/plutosvg/install" -DCMAKE_BUILD_TYPE=Release -DCMAKE_GENERATOR_TOOLSET=v142 -A Win32 -DCMAKE_SYSTEM_VERSION=8.1 cmake --build build --config Release cmake --install build
I found that the lib folder only has .lib files but no .dll files. Is this the reason?
The text was updated successfully, but these errors were encountered: