Blame doc/linking.dox

Packit Service 31306d
/**
Packit Service 31306d
Packit Service 31306d
@page libssh_linking The Linking HowTo
Packit Service 31306d
Packit Service 31306d
@section dynamic Dynamic Linking
Packit Service 31306d
Packit Service 31306d
On UNIX and Windows systems its the same, you need at least the libssh.h
Packit Service 31306d
header file and the libssh shared library.
Packit Service 31306d
Packit Service 31306d
@section static Static Linking
Packit Service 31306d
Packit Service 31306d
@warning The libssh library is licensed under the LGPL! Make sure you
Packit Service 31306d
understand what this means to your codebase if you want to distribute
Packit Service 31306d
binaries and link statically against LGPL code!
Packit Service 31306d
Packit Service 31306d
On UNIX systems linking against the static version of the library is the
Packit Service 31306d
same as linking against the shared library. Both have the same name. Some
Packit Service 31306d
build system require to use the full path to the static library.
Packit Service 31306d
Packit Service 31306d
To be able to compile the application you're developing you need to either pass
Packit Service 31306d
LIBSSH_STATIC as a define in the compiler command line or define it before you
Packit Service 31306d
include libssh.h.  This is required cause the dynamic library needs to specify
Packit Service 31306d
the dllimport attribute.
Packit Service 31306d
Packit Service 31306d
@code
Packit Service 31306d
#define LIBSSH_STATIC 1
Packit Service 31306d
#include <libssh/libssh.h>
Packit Service 31306d
@endcode
Packit Service 31306d
Packit Service 31306d
If you're are statically linking with OpenSSL, read the "Linking your
Packit Service 31306d
application" section in the NOTES.[OS] in the OpenSSL source tree!
Packit Service 31306d
Packit Service 31306d
*/