Bugs item #2476770, was opened at 2008-12-30 19:40
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2476770&group_id=125852
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Sisyphus (sisyphus_)
Assigned to: Nobody/Anonymous (nobody)
Summary: Win32, static lib (using MinGW in MSYS shell)
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
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2476770&group_id=125852
------------------------------------------------------------------------------
_______________________________________________
libssh2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libssh2-devel