Daniel Stenberg <dan...@haxx.se> writes: > Hi friends, > > Can anyone who actually uses mingw to build libssh2 help me out with some > feedback on this. I know we've poked a bit on these files lately, so I don't > like to just blindly commit this contributed patch and I just don't have any > windows setup nearby to test it on. > > So please tell me: commit or not commit?
Question: why is -lgdi32 added? It isn't clear from the report. I think that we should be careful about adding more dependencies unless they are really needed. I do agree with removing the -DLIBSSH2_WIN32 flag though. I haven't tested it, and it may lead to errors, but those errors can (probably) be worked around in other (better) ways. /Simon > ---------- Forwarded message ---------- > Bugs item #2476770, was opened at 2008-12-30 19:40 > Message generated for change (Comment added) made by sisyphus_ > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2476770&group_id=125852 > > Initial Comment: > Hi, > I've just built a static libssh2-1.0 for native Win32 in the MSYS shell using > the MinGW port of gcc-3.4.5. There were a couple of hoops to jump through: > > In the configure script, I changed: > > case "$host" in > *-mingw*) > CFLAGS="$CFLAGS -DLIBSSH2_WIN32 -DWINSOCK_VERSION=0x0200" > LIBS="$LIBS -lws2_32" > ;; > > to: > > case "$host" in > *-mingw*) > CFLAGS="$CFLAGS -DWINSOCK_VERSION=0x0200" > LIBS="$LIBS -lws2_32 -lgdi32" > ;; > > That's just 2 changes; remove the -DLIBSSH2_WIN32 symbol, and add the link to > libgdi32.a. > > The removal of the -DLIBSSH2_WIN32 symbol may not be the correct thing to do > if a dynamic lib is being built. (I couldn't build a dynamic lib.) > > If LIBSSH2_WIN32 is defined, the example/simple executables apparently expect > to link to a dynamic library, so fail to build, and 'make' dies. > > In libssh2_priv.h I also changed the 'usleep' to '__usleep' to avoid a clash > with the usleep function already defined in unistd.h. This (libssh2) function > doesn't appear to be used anywhere, so I could possibly have just commented > it out. > > Thanks for the library !! > > Cheers, > Rob > > > ---------------------------------------------------------------------- > >>Comment By: Sisyphus (sisyphus_) > Date: 2009-02-21 22:14 > > Message: > As per bagder's request for a proper patch to configure.in: > > --- configure.in_orig Sat Feb 21 21:46:40 2009 > +++ configure.in Sat Feb 21 21:46:32 2009 > @@ -29,8 +29,8 @@ > AC_CANONICAL_HOST > case "$host" in > *-mingw*) > - CFLAGS="$CFLAGS -DLIBSSH2_WIN32 -DWINSOCK_VERSION=0x0200" > - LIBS="$LIBS -lws2_32" > + CFLAGS="$CFLAGS -DWINSOCK_VERSION=0x0200" > + LIBS="$LIBS -lws2_32 -lgdi32" > ;; > *-cygwin) > CFLAGS="$CFLAGS -DLIBSSH2_WIN32" > > Cheers, > Rob > > ---------------------------------------------------------------------- > > Comment By: Daniel Stenberg (bagder) > Date: 2009-02-18 10:14 > > Message: > No feedback. Set to pending. > > ---------------------------------------------------------------------- > > Comment By: Daniel Stenberg (bagder) > Date: 2009-01-23 10:55 > > Message: > Any chance you can make a "proper" patch for these suggested changes? And > note that you modify configure.in, not the configure script itself. > > ---------------------------------------------------------------------- > > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2476770&group_id=125852 > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > libssh2-devel mailing list > libssh2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libssh2-devel ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ libssh2-devel mailing list libssh2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libssh2-devel