Skip to content

Commit 0dc4357

Browse files
d3x0rd3x0r
authored andcommitted
_WINDLL being defined doesn't mean libssh2 was built as a DLL (libssh2#1578) (libssh2#1793)
libssh2#1578 WINDLL means that the current project using this library is a DLL; not that this library was built as a DLL. This check for _WINDLL is incorrect, and the LIBSSH2_EXPORTS flag should be used instead. Description of problem - build libssh2 as a static library to be included in a dynamic library; if libssh2 uses _WINDLL then the names generated are `__imp_*` which do not exist in the static build of the library. --------- Co-authored-by: d3x0r <d3x0r@no-reply.github.com>
1 parent 0e39172 commit 0dc4357

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/libssh2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ extern "C" {
105105
/* Allow alternate API prefix from CFLAGS or calling app */
106106
#ifndef LIBSSH2_API
107107
# ifdef _WIN32
108-
# if defined(LIBSSH2_EXPORTS) || defined(_WINDLL)
108+
# ifdef LIBSSH2_EXPORTS
109109
# ifdef LIBSSH2_LIBRARY
110110
# define LIBSSH2_API __declspec(dllexport)
111111
# else

0 commit comments

Comments
 (0)