It is possible to build a DLL with -static. You may need --enable-shared or 
something if you are using configure script (I am not familiar with it though).
When you specify -static or -static-libgcc -static-libstdc++, g++ links against 
libgcc_eh.a rather than libgcc_s.a. These two files are in different folders.

------------------                               
Best regards,
lh_mouse
2014-05-05

-------------------------------------------------------------
发件人:YIRAN LI <mrfun.ch...@gmail.com>
发送日期:2014-05-05 16:34
收件人:mingw-w64-public
抄送:
主题:Re: [Mingw-w64-public] how to remove libgcc_s_sjlj-1.dll dependency

2014-05-05 18:28 GMT+10:00 Alexpux <alex...@gmail.com>:

>
> 05 мая 2014 г., в 12:22, YIRAN LI <mrfun.ch...@gmail.com> написал(а):
>
>
>
>
> 2014-05-05 17:32 GMT+10:00 lh_mouse <lh_mo...@126.com>:
>
>> 0) Try -static first. I have been using this option since long ago and it
>> never fails;
>> 1) Try -static-libgcc -static-libstdc++. These two should be used
>> together. Using only one of them does not work, at least on my machine.
>> 2) There is no space in '-static-libgcc'.
>>
>>
> Thanks, I used -static, but seems it causes the project to generate static
> libs instead of dlls. I think it should be the problem of the project
> (libtheora) and I've sent out a mail to libtheora's mail list.
>
>
> Use -static you always get only static libs.
>

Thanks, then -static is not what I want. I need dlls. but these dlls can't
be dynamically linked to libgcc.

I also checked MinGW folder

hxuanyu-nch@hxuanyu-PC/cygdrive/c/i686-4.9.0-release-win32-sjlj-rt_v3-rev1/mingw32
$ find ./ -name "libgcc.a"
./lib/gcc/i686-w64-mingw32/4.9.0/64/libgcc.a
./lib/gcc/i686-w64-mingw32/4.9.0/libgcc.a

hxuanyu-nch@hxuanyu-PC/cygdrive/c/i686-4.9.0-release-win32-sjlj-rt_v3-rev1/mingw32
$ find ./ -name "libgcc_s.a"
./i686-w64-mingw32/lib/libgcc_s.a
./i686-w64-mingw32/lib64/libgcc_s.a
./lib/gcc/i686-w64-mingw32/lib/libgcc_s.a
./lib/gcc/i686-w64-mingw32/lib64/libgcc_s.a

see that there's no libgcc_s.a in ./lib/gcc/i686-w64-mingw32/4.9.0, I'm not
sure if I specify -static-libgcc, ld could find correct libgcc_s.a

Thanks




------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to