help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to create a static binary with g++?


From: Paul Pluzhnikov
Subject: Re: How to create a static binary with g++?
Date: 17 May 2004 15:02:14 -0700
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence)

Ralf Fassel <ralfixx@gmx.de> writes:

> * Thomas Müller <spam@elfstone.de>
> | Gives me an error like this:
> | 
> | > /usr/lib/gcc-lib/i586-suse-linux/3.3.1/../../../../i586-suse-linux/bin/ld:
> | > cannot find -lsmtp++
> 
> My guess is that you need a static version of libsmtp++, but you only
> have the dynamic version installed.

Also note that:

- libraries should be listed *after* the objects/sources that
  reference them. This is especially important for archive libraries.

  See this thread for explanation:
  
http://groups.google.com/groups?selm=qt7B7.4096%24AQ6.384368%40newsread2.prod.itd.earthlink.net

- static linking on UNIX is generally a bad idea (TM), and is
  especially bad idea on Linux. Your static executable is much less
  likely to run on other Linux distributions, then if it was linked
  dynamically against proper subset of libraries.

  See this thread for details:
  http://groups.google.com/groups?threadm=3E531639.4050605%40BitWagon.com

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]