[Ace-users] Note for mingw32 compiling

andy ypwangandy at gmail.com
Thu Jun 28 21:00:11 CDT 2007


Hi, All

Here are some notes for compiling on Mingw32.

1. mingw+SSL
usually the openssl compiled on mingw32 is libssl32.a(libssl32.dll)
and libeay32.a(libeay32.dll) so it is better to use these. Do the
changing below.
$ACE_ROOT/include/makeinclude/platform_mingw32.GNU
+PLATFORM_SSL_LIBS = -lssl32 -leay32

actually you can still use libssl.a and libcrypto.a (which are static
library) but you need to add "-lgdi32" in order to make linker happy
since the crypto/rand/rand_win.c uses CreateDC and related stuff.

2. libACE.dll needs mingwm10.dll
>From Mingw mthr.c::__mingwthr_key_dtor
 *  - gcc uses -mthreads option
 *  - user code uses C++ exceptions
 *
 * The sole job of the Mingw thread support DLL (MingwThr) is to
catch
 * all the dying threads and clean up the data allocated in the TLSs
 * for exception contexts during C++ EH. Posix threads have key
dtors,
 * but win32 TLS keys do not, hence the magic. Without this, there's
at
 * least `6 * sizeof (void*)' bytes leaks for each catch/throw in each
 * thread. The only public interface is __mingwthr_key_dtor().
 *
 * Created by Mumit Khan  <khan at nanotech.wisc.edu>

Enjoy!
Andy



More information about the Ace-users mailing list