<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.6000.16544" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV>In summary here is what I've done:</DIV>
<DIV>I installed mingw-w64</DIV>
<DIV>I built versions of openssl using both x86_64-w64-mingw32 and
i686-w64-mingw32 successfully. </DIV>
<DIV>I copied the resulting libssl.a and libcrypto.a static libraries to my
project lib/i386-win32 and lib/x86_64-win64 folders.</DIV>
<DIV>I setup my environment to refer to /usr/x86_64-w64-mingw32/lib
or /usr/i686-w64-mingw32/lib in order to satisy msvcrt, user32
ect</DIV>
<DIV>I had to copy libgcc.a from /usr/lib/gcc/x86_64-w64-mingw32/4.6
and /usr/lib/gcc/i686-w64-mingw32/4.6</DIV>
<DIV> libgcc.a contains "___chkstk_ms" which needs to be resolved.</DIV>
<DIV> i place a copy of the file in my project lib/i386-win32
and lib/x86_64-win64 folders.</DIV>
<DIV>On linux I build for i386-linux and it succeeds. The test
application on linux returns the expected results from openssl
functions.</DIV>
<DIV>On linux I build for x86_64-win64 and it succeeds. The
test application is copied to my 64bit windows box and returns the expected
results from openssl functions.</DIV>
<DIV>On linux I build for i386-win32 and it the linker fails when it
cannot locale __time32, __localtime32, and __gmtime32.</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT><FONT face=Arial
color=#0000ff size=2></FONT><BR></DIV>
<DIV><SPAN class=765120208-15052012><FONT face=Arial color=#0000ff
size=2> </FONT></SPAN></DIV></BLOCKQUOTE>
<DIV dir=ltr><SPAN class=765120208-15052012><FONT face=Arial size=2>localtime
is on windows an inline function that translates to localtime64 unless
<SPAN><SPAN class=input>_USE_32BIT_TIME_T</SPAN></SPAN> is defined.
Propably one of the libs you import has been compiled with this define (or
equivalent for mingw)</FONT></SPAN></DIV>
<DIV dir=ltr><SPAN class=765120208-15052012><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr><FONT face=Arial><FONT size=2><SPAN
class=765120208-15052012>mingw libmsvcrt.a doesn't contain
__time32 while VC9 msvcrt.lib does. Mingw has apparently chosen not to
define them. </SPAN></FONT></FONT></DIV>
<DIV dir=ltr><FONT face=Arial><FONT size=2><SPAN
class=765120208-15052012></SPAN></FONT></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial><FONT size=2><SPAN
class=765120208-15052012></SPAN></FONT></FONT> </DIV>
<DIV dir=ltr><SPAN class=765120208-15052012><FONT face=Arial
size=2>Ludo</FONT></SPAN></DIV></BODY></HTML>