sandkasten
sandkasten

Reputation: 613

Compile libssh with msvc for x64

First of all, I’m not an expert in build libraries from the source with cmake and all this stuff. But unfortunately I have to. I followed up the steps mention in the INSTALL document of the libssh and read a few archived mails but nothing helps me out. It sounds so easy on the web, but I didn’t bring it to work. Here is what I’ve done so far:

Everything is installed in the default paths. Now starts cmake-gui.exe and set source code to …/src folder and binaries to …/build folder, press ‘Configure’ button, with Visual Studio 12 2013 Win64. Now the first error is generated: install Library TARGETS given no DESTINATION. Okay, checks make file which use variable LIB_INSTALL_DIR to set the path, in my case the path is empty. Add item to cmake-gui named LIB_INSTALL_DIR with path to ../build dir.

Fine, configuration works, generate works, open project works. Try to build ‘ALL_BUILD’ ends up in error: C1083: Cannot open include file: 'config.h': No such file or directory. Searched my whole disk for the file, nothing found. I believe cmake have to generate this file, guessing right? Or is this file missing? Hope someone can help me out! Or maybe have a link to an already compiled lib? Doesn’t understand why libssh doesn’t offers a download, x64 is quite normal today.

Upvotes: 1

Views: 2064

Answers (1)

sandkasten
sandkasten

Reputation: 613

Initial inspiration is often the right one, the missing config.h is normally generated by cmake.

If you using cmake-gui.exe, it expects an path to the source, heading is ‘Where is the source code:’. I thought this means the path to the source code files, which are located under …/src, but this is wrong. I need to the set the path to the root folder, in my case and everything works like a charm.

Also need to change back to OpenSSL version 1.0.2, because somewhere around 30 function declarations has changed.

Upvotes: 2

Related Questions