Ludovic Gélé | 9 Jan 11:53 2009

Maybe a bug in the Windows version...

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'
1>libssh2-1.0.1-20090109\include\libssh2.h(561) : error C4430: 
spécificateur de type manquant - int est pris en compte par défaut. 
Remarque : C++ ne prend pas en charge int par défaut
1>libssh2-1.0.1-20090109\include\libssh2.h(563) : error C4430: 
spécificateur de type manquant - int est pris en compte par défaut. 
Remarque : C++ ne prend pas en charge int par défaut
1>libssh2-1.0.1-20090109\include\libssh2.h(584) : error C2146: erreur de 
syntaxe : absence de ';' avant l'identificateur 'libssh2_channel_write_ex'
1>libssh2-1.0.1-20090109\include\libssh2.h(584) : error C4430: 
spécificateur de type manquant - int est pris en compte par défaut. 
Remarque : C++ ne prend pas en charge int par défaut
1>libssh2-1.0.1-20090109\include\libssh2.h(584) : error C2086: 'int 
ssize_t' : redéfinition
1>        c:\documents and settings\gele\mes 
documents\devel\c\libssh2-1.0.1-20090109\include\libssh2.h(561) : voir 
la déclaration de 'ssize_t'
1>libssh2-1.0.1-20090109\include\libssh2.h(586) : error C4430: 
spécificateur de type manquant - int est pris en compte par défaut. 
Remarque : C++ ne prend pas en charge int par défaut

(for writing my first code source, i use your example on the  overview 
page of the SSH2 protocol on your website)
(Continue reading)

Alexander Lamaison | 9 Jan 14:06 2009
Picon

Re: Maybe a bug in the Windows version...

2009/1/9 Ludovic Gélé <ludovic.gele@...>:
> 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.

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
(Continue reading)

Ludovic Gélé | 9 Jan 14:43 2009

Re: Maybe a bug in the Windows version...

Alexander Lamaison a écrit :
> 2009/1/9 Ludovic Gélé <ludovic.gele@...>:
>   
>> 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
(Continue reading)

Neil Gierman | 9 Jan 16:12 2009

Re: Maybe a bug in the Windows version...


> -----Original Message-----
> From: Ludovic Gélé [mailto:ludovic.gele@...]
> Sent: Friday, January 09, 2009 7:43 AM
> To: Alexander Lamaison
> Cc: libssh2-devel@...
> Subject: Re: [libssh2] Maybe a bug in the Windows version...
> 
> Alexander Lamaison a écrit :
> > 2009/1/9 Ludovic Gélé <ludovic.gele@...>:
> >
> >> 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:
(Continue reading)

Alexander Lamaison | 9 Jan 16:54 2009
Picon

Re: Maybe a bug in the Windows version...

2009/1/9 Neil Gierman <ngierman@...>:

> 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).

My defines are similar and I also have the following include paths set:

AdditionalIncludeDirectories="libssh2\include;libssh2\win32;openssl\inc32;zlib\include"

which means users of my project can just dump libssh2 from the CVS
into the libssh2/ directory as-is and compile.  They don't have to
copy or edit anything (though, off course, I have a custom .vcproj for
libssh2 in my top-level directory).  Every little helps.

------------------------------------------------------------------------------
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
Ludovic Gele | 10 Jan 11:50 2009

Re: Maybe a bug in the Windows version...

"Alexander Lamaison" <swish@...> a écrit :

> 2009/1/9 Neil Gierman <ngierman@...>:
>
>> 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).
>
> My defines are similar and I also have the following include paths set:
>
> >AdditionalIncludeDirectories="libssh2\include;libssh2\win32;openssl\inc32;
> zlib\include"
>
> which means users of my project can just dump libssh2 from the CVS
> into the libssh2/ directory as-is and compile.  They don't have to
> copy or edit anything (though, off course, I have a custom .vcproj for
> libssh2 in my top-level directory).  Every little helps.
>

Hi,

That's very strange, for being sure that I have not a VStudio broken  
installation, I install it on my home computer, where it was never  
(Continue reading)

Alexander Lamaison | 10 Jan 12:26 2009
Picon

Re: Maybe a bug in the Windows version...

2009/1/10 Ludovic Gele <ludovic.gele@...>:
> That's very strange, for being sure that I have not a VStudio broken
> installation, I install it on my home computer, where it was never
> installed. I haven't install any plateform SDK, SUA SDK or MinGW
> environnement. Just the Visual Studio Express 2008, openssl0.9.8j for
> windows32, the vcredist, and the ZLIB for windows from here:
> http://gnuwin32.sourceforge.net/packages/zlib.htm
>
> This is my preprocessor definition for the release build, and for the three
> projects (libssh2_dll, libssh2_lib and tests):
> WIN32
> NDEBUG
> LIBSSH2_WIN32
> _LIB
> _CRT_SECURE_NO_WARNINGS
> _CRT_SECURE_NO_DEPRECATE
>
> This is all my include dirs:
>
> c:\program files\gnuwin32\include
> libssh2\win32
> libssh2\include
> c:\openssl\include
> $(VCInstallDir)\include
> $(VCInstallDir)\atlmfc\include
> $(WindowsSDKDir)\include
> $(FrameworkSDKDir)include
>
> and for the lib dir:
>
(Continue reading)

Ludovic Gélé | 12 Jan 13:46 2009

Re: Maybe a bug in the Windows version...

Alexander Lamaison a écrit :
> I'm a little worried about the presence of c:\program
> files\gnuwin32\include in the includes.  Is there a particular reason
> for not using the regular version from http://www.zlib.net/?  This may
> not be the problem but it helps to eliminate any differences.
>   
Sorry for this, I thought I 've got to use this version. I use now the 
compiled zlib dll version 1.2.3. For make it usable, I have copy the 
c:\zlib123-dll\lib\zdll.lib in c:\zlib123-dll\lib\zlib.lib because the 
linker looks for zlib.lib file, not the zdll.lib file for the 
libssh2_dll project.

For the test project, I still have the same error messages...

------------------------------------------------------------------------------
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
Ludovic Gélé | 15 Jan 16:40 2009

Re: Importing libssh2 project in VS 2008, Was: Maybe a bug in the Windows version...

Neil Gierman a écrit :
>   
>> -----Original Message-----
>> From: Ludovic Gélé [mailto:ludovic.gele@...]
>> Sent: Friday, January 09, 2009 7:43 AM
>> To: Alexander Lamaison
>> Cc: libssh2-devel@...
>> Subject: Re: [libssh2] Maybe a bug in the Windows version...
>>
>> Alexander Lamaison a écrit :
>>     
>>> 2009/1/9 Ludovic Gélé <ludovic.gele@...>:
>>>
>>>       
>>>> 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:
>>>>         
(Continue reading)


Gmane