Subject: Compile error in examples under MinGW

Compile error in examples under MinGW

From: Luis Lavena <>
Date: Fri, 10 Dec 2010 17:34:10 -0300


I'm trying to compile latest snapshot (libssh2-1.2.8-20101210.tar.gz)
using GCC 4.5.1 (TDM release) on Windows 7 x64.

Configure works as expected and the library compile mostly without
warnings (except one for libz.a)

Anyhow, there is a problem compiling examples:

make[2]: Entering directory
if gcc -DHAVE_CONFIG_H -I../include -I../example -DLIBSSH2_WIN32
-DWINSOCK_VERSION=0x0200 -MT direct_tcpip.o -MD -MP -MF
".deps/direct_tcpip.Tpo" -c -o direct_tcpip.o direct_tcpip.c; \
        then mv -f ".deps/direct_tcpip.Tpo" ".deps/direct_tcpip.Po";
else rm -f ".deps/direct_tcpip.Tpo"; exit 1; fi
In file included from direct_tcpip.c:2:0:
../include/libssh2.h:134:16: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'libssh2_socket_t'
../include/libssh2.h:447:43: error: expected declaration specifiers or
'...' before 'libssh2_socket_t'
make[2]: *** [direct_tcpip.o] Error 1
make[2]: Leaving directory
make[1]: *** [all] Error 2
make[1]: Leaving directory
make: *** [all-recursive] Error 1

Anyone seen this too?

I cannot use code from git directly as my dev environment lacks libtoolize.

Thank you in advance,

Luis Lavena
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
Received on 2010-12-10