www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: problems building under Windows

problems building under Windows

From: Matthew Fleming <mgflem_at_gmail.com>
Date: Sun, 20 Dec 2015 11:44:57 -0600

Hi,

I'm trying to build libssh2 for use under Windows. I am using Visual Studio
Community 2015 under Windows 10. I tried opening the Visual Studio Solution
under libssh2-1.6.0/win. Trying to build this solution produces the
following error:

1>cl : Command line error D8016: '/ZI' and '/Gy-' command-line options are
incompatible
2>cl : Command line error D8016: '/ZI' and '/Gy-' command-line options are
incompatible

When I remove the /ZI switch I get this error:

 version.c
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1925): warning C4005: 'snprintf':
macro redefinition
1> ..\win32\libssh2_config.h(27): note: see previous definition of
'snprintf'
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1927): fatal error C1189: #error:
 Macro definition of snprintf conflicts with Standard Library function
declaration
1> wincng.c
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1925): warning C4005: 'snprintf':
macro redefinition
1> ..\win32\libssh2_config.h(27): note: see previous definition of
'snprintf'
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1927): fatal error C1189: #error:
 Macro definition of snprintf conflicts with Standard Library function
declaration

I get the same snprintf error if I use nmake.

Advice as to how to solve these problems would be greatly appreciated,
thanks.

Matthew Fleming

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2015-12-20

the libssh2 team