> -----Original Message-----
> From: Ludovic Gélé [mailto:ludovic.g...@raysa.org]
> Sent: Friday, January 09, 2009 7:43 AM
> To: Alexander Lamaison
> Cc: libssh2-devel@lists.sourceforge.net
> Subject: Re: [libssh2] Maybe a bug in the Windows version...
> 
> Alexander Lamaison a écrit :
> > 2009/1/9 Ludovic Gélé <ludovic.g...@raysa.org>:
> >
> >> Hi folks,
> >>
> >> I'm trying to use your lib for my app, but it seems there is a
> little
> >> problem in the libssh2.h file. When I try to compile my source code,
> or
> >> the "test\simple.c" source code, I've the same errors. For my source
> code:
> >>
> >> 1>libssh2-1.0.1-20090109\include\libssh2.h(561) : error C2146:
> erreur de
> >> syntaxe : absence de ';' avant l'identificateur
> 'libssh2_channel_read_ex'
> >>
> >
> > snip
> >
> >
> >> I'm under WinXP SP3, with openssl 0.9.8j, downloaded here:
> >> http://www.slproweb.com/products/Win32OpenSSL.html
> >>
> >> I use the libssh2-1.0.1-20090109 source code for the lib, and I'm
> under
> >> Visual studio 2008 express
> >>
> >
> > Have you defined LIBSSH2_WIN32 in your Preprocessor definitions?
> > Newer versions of the SDK haven't got a definition of ssize_t.
> > Libssh2.h will add it if missing, but only if it knows it needs to so
> > you need the previous definition to let it compile Windows-specific
> > code.
> >
> > HTH
> >
> > Alex.
> >
> Hi Alexander,
> 
> Thank you for answering me.
> 
> I had not configure the preprocessor definition, but when I do it, i
> have no explicit error about ssize_t anymore, but the error C2146 about
> libssh2_channel_read_ex and libssh2_channel_write_ex still occur. The
> compiler tell me that the type is not specified, but in the source code
> of libss2.h line 561 it's a LIBSSH2_API ssize_t type :-/
> 
> I've tried to change the order of the preprocessor definitions, but
> these won't work. Is there an other preprocessor definition needed?
> I've
> tried LIBSSH2_API, but I wasn't see the ifNdef...
> 
> Can I try something else?
> 
> -----------------------------------------------------------------------
> -------
> Check out the new SourceForge.net Marketplace.
> It is the best place to buy or sell services for
> just about anything Open Source.
> http://p.sf.net/sfu/Xq1LFB
> _______________________________________________
> libssh2-devel mailing list
> libssh2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libssh2-devel

I use Visual Studio 2008 and my Defines for the libssh2 project are:

WIN32;_DEBUG;LIBSSH2_WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRE
CATE for debug builds and:

WIN32;NDEBUG;LIBSSH2_WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRE
CATE for release builds.

Also don't forget that you need to copy libssh2_config.h from the win32
directory to the src directory (that's a pre-build event in my project).

All of this is with the 0.18 version of libssh2. I have not tried the 1.0
version yet.

Neil



------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
libssh2-devel mailing list
libssh2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel

Reply via email to