This is the mail archive of the
pthreads-win32@sources.redhat.com
mailing list for the pthreas-win32 project.
Re: [Mingw-users] mingw32 DLLs, threads and exceptions HOWTO
- To: Thomas Pfaff <tpfaff at gmx dot net>, mingw-users at lists dot sourceforge dot net, pthreads-win32 at sources dot redhat dot com
- Subject: Re: [Mingw-users] mingw32 DLLs, threads and exceptions HOWTO
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- Date: Thu, 25 Jan 2001 11:02:19 +1300 (NZDT)
--- Thomas Pfaff <tpfaff@gmx.net> wrote: > Dear all,
>
> this is a summary that should help users to have thread safe
> exception
> handling over DLL exported functions.
> If you don't care about c++ exceptions you can stop reading here.
[]
>
> To build the gcc dll i did the following steps.
>
> 1. create a temporary directory libgcc
> 2. copy libgcc.a from gcc-2.95.2\lib\gcc-lib\i386-mingw32\gcc-2.95.2
> to that
> directory
> 3. ar -x libgcc.a
> 4. create a directory tmp and move __main.o, _exit.o and __dummy.o in
> that
> directory
> 5. build the dll
> gcc -shared -mthreads -o gcc.dll *.o
> strip gcc.dll
> Move this dll into your gcc\bin directory
> 6. Move _chkstk.o and frame.o to the tmp directory, otherwise you
> break the
> builtin alloca.
> 7. Build the import library libgcc.a
> dllwrap --export-all --dllname=gcc.dll --output-def=libgcc.def
> --output-lib=
> libgcc.a *.o
> ar -q libgcc.a tmp/*.o
> strip --strip-debug libgcc.a
> ranlib libgcc.a
> 8. save your old libgcc.a, copy the new libgcc.a into
> gcc-2.95.2\lib\gcc-lib\i386-mingw32\gcc-2.95.2
>
>
[]
> I believe that these steps are at least necessary if you are trying
> to use
> the pthreads-win32 library (which is required if you want to use gtk+
> on
> win32).
> They will make mingw32 a real replacement for MSVC (at least for me).
Has anyone tried this (besides myself). If so, any problems, other
than having to distribute versioned libgcc_x.xx.dll with executeables?
Danny
_____________________________________________________________________________
http://cars.yahoo.com.au/ - Yahoo! Cars
- Buy, sell or finance a car..