Subject: Re: Windows Build

Re: Windows Build

From: Alexander Lamaison <swish_at_lammy.co.uk>
Date: Wed, 2 Sep 2015 11:10:44 +0100

On 1 September 2015 at 23:32, Matthew Voss <ormris_at_ormris.us> wrote:
> Thanks for the input! I managed to find this email from a while back:
> http://www.libssh2.org/mail/libssh2-devel-archive-2012-09/0029.shtml
>
> I followed the instructions, and I was down to a single error.
> Essentially, it can't find the declaration of "struct ocsp_response_st",
> so it's giving me error C2059 (invalid typedef). This is available in
> "crypto/ospf.h", but it isn't included in any other header files or in
> the libssh2 code. I went ahead an inserted it into the appropriate
> header file, but got a bunch of errors that I think are the results of
> an undefined macro.

...snip

> Are these macros provided by another library? Do they need to be
> manually defined?

Inserting extra #includes will just lead you on a wild goose chase.
Stick to using the source as-is.

Keep in mind, this code is widely used, and is probably built several
hundred times a day round the world, including on Windows. If extra
includes were required to do a basic build, they would already be
there [1].

I recommend configuring the project with CMake, even if you aren't
going to use it that way. Doing so will immediately tell you where
the problem lies: if it gives you OpenSSL errors again, there is
something wrong with your OpenSSL installation. If it works fine,
there was something wrong with your handcrafted project file. In that
case, you can use the CMake-generated project as a guide to fixing
your project.

Or just keep using CMake. Things have changed since 2012, when I
wrote the message you linked to. The CMake option didn't exist back
then, so, on Windows, you were stuck with a limited selection of
pre-baked projects for really old VS versions. That's why I favoured
hand-crafting your own. Now CMake can generate projects with support
for many compilers and up-to-date VS versions, 32 or 64-bit, and with
the same choice of options that are available on Linux/Mac OS.

[1] Unless you are doing something quite specialised like using custom
variants of OpenSSL - You'd know if you were.

HTH

Alex

-- 
Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2015-09-02