linking in solaris9

at the end of the compilation in solaris 9. it is showing link error.

like.....

ld: fatal: library -lgthread-2.0 not found

failed to create the binary

the library is in /usr/lib and in /usr/local/lib the lib file is present

--->libgthread.2.0.so ......etc

if i remove -lgthread-2.0 flag from Makefile. It shows some undefinde symbols first time used in ------> libgthread.2.0.so.0 file.

what can be reason of this error ......and solution of it...

"have a good day"

Have you set LD_LIBRARY_PATH ?

LD_LIBRARY_PATH shows both /usr/lib as well as /usr/local/lib

The path might be there. But how abt the lib files within? any missing? or any corrupted?any changes done to the system? did the system went through a filsystem check recently?