Currently, while compiling a C program which uses pthread library function I have to specify compiler option -lpthread explicitly. Please suggest a way to configure ldconfig so that the pthread library could be used without specifying it on the command line.
presently lpthread -p gives the following output :=
[root@localhost lib]# ldconfig -p | grep pthread
libpthread.so.0 (libc6, OS ABI: Linux 2.6.9) => /lib/libpthread.so.0
libOpenIPMIpthread.so.0 (libc6) => /usr/lib/libOpenIPMIpthread.so.0
I don’t believe you can do that. The LD_LIBRARY_PATH and ldconfig program are used to set up the paths to shared libraries that are used to resolve dependencies in your executable at runtime.
When compiling you will have to specify which libraries to include in the linking phase, i.e. -lpthread