imp

Linking error LNK2019 in MSVC, unresolved symbols with __imp__ prefix, but should be from static lib

跟風遠走 提交于 2019-11-26 14:15:55
问题 I'm running into linking problems in MSVC for a project that I wrote for g++. Here's the problem: I build libssh as a static library as part of my application, adding the target in cmake with add_library(ssh_static STATIC $libssh_SRCS) Libssh is in C, so I have 'extern "C" {...}' wrapping the includes in my c++ sources. I then link the ssh_static target to my executable, sshconnectiontest, with target_link_libraries(sshconnectiontest ... ssh_static ...) This all works fine in linux with gcc,