[Lazarus] RE : Cross compile problem with linklib and static libraries
ludo.brands at free.fr
Tue May 15 10:41:08 CEST 2012
In summary here is what I've done:
I installed mingw-w64
I built versions of openssl using both x86_64-w64-mingw32 and
I copied the resulting libssl.a and libcrypto.a static libraries to my
project lib/i386-win32 and lib/x86_64-win64 folders.
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
I had to copy libgcc.a from /usr/lib/gcc/x86_64-w64-mingw32/4.6 and
libgcc.a contains "___chkstk_ms" which needs to be resolved.
i place a copy of the file in my project lib/i386-win32 and
On linux I build for i386-linux and it succeeds. The test application on
linux returns the expected results from openssl functions.
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
On linux I build for i386-win32 and it the linker fails when it cannot
locale __time32, __localtime32, and __gmtime32.
localtime is on windows an inline function that translates to localtime64
unless _USE_32BIT_TIME_T is defined. Propably one of the libs you import has
been compiled with this define (or equivalent for mingw)
mingw libmsvcrt.a doesn't contain __time32 while VC9 msvcrt.lib does. Mingw
has apparently chosen not to define them.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus