lkml.org 
[lkml]   [1998]   [Mar]   [22]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 22 Mar 1998 13:13:06 +0100
FromKurt Garloff <>
SubjectRe: [OFFTOPIC?] gcc/pgcc probs
On Sun, Mar 22, 1998 at 09:42:42AM -0000, Meino Christian Cramer wrote:
>  gcc -c HelloLinux.c -o HelloLinux
>  works -- but again it was statically linked. But
> 
>  gcc -fpic -c HelloLinux.c HelloLinux.
> 
>  produces a program that segfaults.

gcc doesn't find the dynamically lib (libc.so), that's why it uses the static 
one (libc.a). Create approriate symlinks:
ln -s /lib/libc.so.X /usr/lib/libc.so
(X = 5 or 6) and maybe: ln -s /usr/lib/libc.so /usr/local/lib

If you don't succeed try 
gcc -c HelloLinux.c; gcc -o HelloLinux HelloLinux.o /usr/lib/libc.so

gcc -fpic is not supposed to create dynamically linked executables but
dynamic libraries.

-- 
Kurt Garloff, Dortmund 
<K.Garloff@ping.de>
PGP key on http://student.physik.uni-dortmund.de/homepages/garloff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 12:41    [W:0.030 / U:0.010 seconds]
©2003-2008 Jasper Spaans