06-12-2012 01:29 PM
I added gcc 2.95.3 to an HP-UX 10.20 32-bit machine ( I do realize that HP-UX 10.20 is old but we need to keep this system because of some clients). I created a hello.c test file in my /test directory. I then attempted to test the gcc with the following command: gcc /test/hello.c -o /test/hello.exe
The error message below was output:
/usr/ccs/bin/ld: Can't find library for -lgcc
I am not sure how to resolve this issue. Any help would be appreciated. Thanks.
Solved! Go to Solution.
06-13-2012 06:34 AM
Thanks for replying.
To answer your question, I just installed the both the OS and gcc on this machine a few weeks ago so gcc has never worked on this machine before.
I do have libgcc.a under /usr/pa20_32/lib. I tried adding both /usr/pa20_32/lib and /usr/pa20_32/lib/libgcc.a to /etc/PATH. I then tried testing gcc again but got the same error.
06-13-2012 07:30 AM
I was able to solve this issue by creating the following symbolic link:
ln -s /usr/pa20_32/lib/libgcc.a /usr/lib/libgcc.a
Thanks for the advice on missing the libgcc.
06-13-2012 05:53 PM
This contains paths to binaries, not libs. ld(1) uses LPATH for that. Or add -L path on the link line.
>by creating the following symbolic link: ln -s /usr/pa20_32/lib/libgcc.a
That's strange, I thought /usr/pa20_32/lib/ would only be for HP products and for performance, not gcc.