Bugs item #2476770, was opened at 2008-12-30 09:40
Message generated for change (Comment added) made by bagder
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: Pending
>Resolution: Out of Date
Priority: 5
Private: No
Submitted By: Sisyphus (sisyphus_)
Assigned to: Daniel Stenberg (bagder)
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


----------------------------------------------------------------------

>Comment By: Daniel Stenberg (bagder)
Date: 2009-02-18 00:14

Message:
No feedback. Set to pending.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2009-01-23 00: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

Reply via email to