[LCP]static vs dynamic linking.

Greg Black gjb at gbch.net
Tue May 6 07:22:02 UTC 2003


On 2003-05-05, Rokicki, Andrew wrote:

> When I link my code dynamically it works.
> something like this 
> $(TARGET) : $(OBJS)
>         $(CXX) -o $(TARGET) $(OBJS) $(LDFLAGS)
> 
> When i add -static it I get a Segmentation Fault.
> 
> $(TARGET) : $(OBJS)
>         $(CXX) -static o $(TARGET) $(OBJS) $(LDFLAGS)
> 
> I am using RH 8.0 with gcc 3.2.
> What am I missing ? 

The moon is in the wrong phase?  You left out the `-' in the
`-o' after `-static'?  There's a bug in your code?  You're using
C++ and expecting it to make sense?  How much would you like us
to guess?

-- 
Greg Black <gjb at gbch.net> <http://www.gbch.net/gjb.html>
GPG signed mail preferred; further information in headers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 249 bytes
Desc: not available
Url : http://lists.linux.org.au/pipermail/linuxcprogramming/attachments/20030506/23fac188/attachment.pgp 


More information about the linuxCprogramming mailing list