I have been trying to figure out how to build this library on Windows for damn near 6 hours, and I am at a complete loss. I have found a lot of answers on these forums before, so I joined up hoping someone might have some idea. The INSTALL file, README file, and Documentation PDF get really jack information on building besides to run CMAKE on it.

http://www.netsieben.com/products/ssh/index.phtml

There is the link. It requires the Botan Crypto Library (http://botan.randombit.net) which is where my issues are coming from. I am not sure if I am supposed to put the Botan files in the 'ne7ssh' directory or what. When I run cmake this is what I get...

Check for working CXX compiler using: Visual Studio 9 2008
Check for working CXX compiler using: Visual Studio 9 2008 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Looking for C++ include botan/botan.h
Looking for C++ include botan/botan.h - not found
CMake Warning (dev) at CMakeLists.txt:9 (add_subdirectory):
  The source directory

    C:/ne7ssh-1.3.2/src

  does not contain a CMakeLists.txt file.

  CMake does not support this case but it used to work accidentally and is
  being allowed for compatibility.

  Policy CMP0014 is not set: Input directories must have CMakeLists.txt.  Run
  "cmake --help-policy CMP0014" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at CMakeLists.txt:69 (install):
  install Library TARGETS given no DESTINATION!


Configuring incomplete, errors occurred!

You can fix the warning:

The source directory

    C:/ne7ssh-1.3.2/src

  does not contain a CMakeLists.txt file.

by commenting:

#add_subdirectory ( src )

Other than that, cmake ran fine for me (Fedora 13). I couldn't build it because I didn't install Botan, but the Makefile was generated successfully.

I could not get the cmake on ne7ssh to work. CMake kept complaining about not finding botan/botan.h. After 2 days of messing around with cmake, I am quitting on cmake and instead built ne7ssh examples by hand.

Here is how I did it:

Build botan.
- Do the regular ./configure.py; make; make install.
- Produces libbotan(.a, .so) and all the headers are in build/include/botan

Copy Botan header and lib files in your project dir.
- Assuming myssh is your project dir,
- Place botan headers under myssh/botan and place botan libs under myssh/lib/
- Copy all ne7ssh src/*.h, src/*.cpp, examples/*.cpp under myssh/ dir
- To build the ne7ssh.so lib issue this g++ command from myssh/:

g++ -shared -fPIC -Wl,-soname,libne7ssh.so -Wall -W -I. crypt.cpp ne7ssh_connection.cpp ne7ssh_error.cpp ne7ssh_keys.cpp ne7ssh_session.cpp ne7ssh_sftp_packet.cpp ne7ssh_transport.cpp ne7ssh_channel.cpp ne7ssh.cpp ne7ssh_kex.cpp ne7ssh_mutex.cpp ne7ssh_sftp.cpp ne7ssh_string.cpp lib/libbotan.a -o libne7ssh.so -lpthread

To get an executable from an example say passwordAuth,
g++ -Wall -W -I. -L. passwordAuth.cpp -o passwordAuth -lpthread -lne7ssh

Hello. Is there anybody who was successful to build NetSieben library on Windows 7 (I am ussing 64bit version)? I am trying since Friday but without success. I have downloaded botan and install it but it could not be included in ne7ssh project. I defined additional library path in VC but 17 errors occurred:

e.g. error C2491: 'ne7ssh::errors' : definition of dllimport function not allowed

I really do not know what to do.

Thanks.

P.S.: Sorry for my English grammar.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.