fangee <[EMAIL PROTECTED]> writes:

> I'm facing a problem trying to statically compile a simple c++ prog,

Unless your target is an embedded system, statically linking it
makes it significantly *less* portable (basically it will work only
on the system on which it was compiled).

Usually people want static linking due to mistaken belief that
static executables are more portable.


> Using g++ 2.95.4 (I must use this to compile a much more complex
> program) this way I get the following output:
>
>    $ g++ -static tmp.cpp
>
>    /usr/bin/../lib/libc.a(syslog.o): In function `__vsyslog_chk':
>    (.text+0x6dd): undefined reference to `_Unwind_Resume'

Apparently your libc.a was compiled with a newer version of gcc.
AFAICT, gcc-2.95.x did not define or use _Unwind_Resume ...

> Any suggestion?

Abandon the goal (which is likely mis-guided to begin with), or
try to link on an older glibc compilation.

FWIW, I can link with "/usr/local/gcc-2.95.3/bin/g++ -static ..."
on RedHat 6.2 with glibc-2.1.3-15

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to