Subject: Re: [Win32] undefined reference

Re: [Win32] undefined reference

From: Alexander Lamaison <>
Date: Thu, 12 Mar 2015 17:42:24 +0000

On 12 Mar 2015 15:17, <> wrote:
> Hi,
> Using a mingw-w64 port of 64-bit gcc-4.8.2 I've built static
openssl-1.0.2, and then built a static libssh2-1.5.0 against that openssl
> But when I try to build against that libssh2-1.5.0 library I get hit with:
> C:\_64\msys\1.0\local\lib\libssh2.a(misc.o):misc.c:(.text+0x40):
undefined reference to `__ms_vsnprintf'
> C:\_64\msys\1.0\local\lib\libssh2.a(scp.o):scp.c:(.text+0x40): undefined
reference to `__ms_vsnprintf'
> What do I need to link to here in order to resolve that ?

I'm not near a computer so can't double check, but those look like CRT
functions to me. I'm guessing you built libssh2 to use the static MSVCRT,
but you've built your main program against a different CRT version. The
versions need to match.


Received on 2015-03-12