This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Creating static libraries using gcc
- From: Scott Sinclair <scott dot sinclair at umgeni dot co dot za>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 19 Mar 2002 11:05:49 +0200
- Subject: Creating static libraries using gcc
Hi
I have a large number of related C++ source files which I want to combine
into a static library using gcc 2.95.3-5 with cygwin. Could anyone tell me
which linker options I need to specify to accomplish this ? I have tried to
link the object files using the -shared switch (although I suspect this
produces something similar to a Windows dll ?) and the object code links
cleanly.
However, when I try to build an executable which requires linking with my
library I get the following error--
collect2:ld terminated with signal 11 [Segmentation fault]
Any help will be appreciated as I can't seem to find anything useful in the
documentation yet.
Thanks
Scott