I have created a shared library in some directory and Copied it to /usr/lib path.
Now when I execute my program by just specifying name of the program with g++ compiler, I am getting error undefined reference to 'printhello' .. Print hello is the function which I have defined in a file and compiled it into library... If I expicitly specift the library with my program , it executes...
But I want my program should automatically link to the required library... How can I achive that????
Plz help me out..
Thanx in advance...