static library for libssh causes unresolved symbols in vc10
-
15-04-2021 - |
Question
I have a C++ dll project in visual studio 10 that I am trying to use libssh for. I would like to statically link the libssh functionality. When I use the non-static libary and include the dll during runtime, the code compiles and executes as expected. But if I change to the static library then I cannot compile and get linker errors for the libssh functions I am trying to use e.g.:
error LNK2019: unresolved external symbol __imp__ssh_free referenced in function ...
Solution
Did you by chance forget to set LIBSSH_STATIC
? This page says you have to define it yourself in the compiler options.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow