1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-31 00:03:07 +03:00

stub of C++ wrapper for libssh

This commit is contained in:
Aris Adamantiadis
2010-01-21 21:54:20 +01:00
parent 245deb2abe
commit 48ba9c9bc1
3 changed files with 78 additions and 1 deletions

View File

@ -1,4 +1,4 @@
project(libssh-examples C)
project(libssh-examples C CXX)
set(examples_SRCS
authentication.c
@ -15,11 +15,13 @@ add_executable(libssh_scp libssh_scp.c ${examples_SRCS})
add_executable(scp_download scp_download.c ${examples_SRCS})
add_executable(samplessh sample.c ${examples_SRCS})
add_executable(exec exec.c ${examples_SRCS})
add_executable(libsshpp libsshpp.cpp)
target_link_libraries(libssh_scp ${LIBSSH_SHARED_LIBRARY})
target_link_libraries(scp_download ${LIBSSH_SHARED_LIBRARY})
target_link_libraries(samplessh ${LIBSSH_SHARED_LIBRARY})
target_link_libraries(exec ${LIBSSH_SHARED_LIBRARY})
target_link_libraries(libsshpp ${LIBSSH_SHARED_LIBRARY})
include_directories(
${LIBSSH_PUBLIC_INCLUDE_DIRS}

10
examples/libsshpp.cpp Normal file
View File

@ -0,0 +1,10 @@
#include <libssh/libsshpp.hpp>
int main(int argc, const char **argv){
ssh::Session session;
session.setOption(SSH_OPTIONS_HOST,"localhost");
session.connect();
session.userauthAutopubkey();
return 0;
}