Subject: mingw cross compilation

mingw cross compilation

From: Thomas Stover <>
Date: Wed, 16 Jun 2010 16:44:11 -0500

I was following some posts I found on the list archives about building
libssh2 for win32 from linux. I actually got it to mostly work up until it
starts to link everything together. Some sort of libtool confusion gets in
the way. Lot's of things like this:

*** Warning: linker path does not have real file for library -lssl.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libssl and none of the candidates passed a file format test
*** using a file magic. Last file checked:

Later it libtool eventually fails with:
../src/.libs/libssh2.a: could not read symbols: Archive has no index; run
ranlib to add one

I think some how I need a "cross libtool" or maybe tell libtool what I'm

-I'm using a home built mingw rooted at

-I have the win32 openssl files in /home/stover/src

-This was my configure:
./configure CC=/opt/crosscompilers/win32/bin/i686-mingw32-gcc
--build=i686-pc-linux-gnu --host=i686-mingw32

Oh well. Maybe some else has a clue.

Received on 2010-06-16