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

Archive Index This month's Index

Subject: Re: Compile error in examples under MinGW

Re: Compile error in examples under MinGW

From: Luis Lavena <luislavena_at_gmail.com>
Date: Sat, 11 Dec 2010 18:04:26 -0300

On Sat, Dec 11, 2010 at 5:52 PM, Peter Stuge <peter_at_stuge.se> wrote:
>> I've tried both --enable-shared and --disable-static, but the same issue.
> Do you want to use a DLL? I have always linked libssh2 statically in
> my projects, which may explain why I haven't seen the problem.

I always prefer static, but wanted to mention tried different
combination with the same results.

>> Above is a common problem of usage of __declspec(dllexport) versus
>> __declspec(dllimport).
> Or linking with the wrong type of library. I've done a fair bit of
> research on DLLs in Windows for libusb, in order to build
> interchangeable (MinGW and MS) DLLs and static libraries. I believe
> I've figured out the minimum that is neccessary, and declspec is not
> enough.

Can you provide a link to your work? I would love take a look and see
what needs to be changed in libssh2

>> Instead, libtool defined DLL_EXPORT:
> ..
>> Could this be the linking issue?
> Sure, but it could also be something else. Can you look into it?
> Especially when switching back and forth between options that are
> relevant for libtool it's nice to do make distclean, to ensure that
> there are no left-overs from a previous build that are causing
> trouble.

I always create a new build directory and run configure inside of it,
never build on top of the source code as policy :-)

Thank you for your time answering my questions.

Luis Lavena
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-12-11

the libssh2 team