I'm trying to understand how libraries work. Here are some questions I have about it:
I downloaded a tarball and extracted it. When I do "./configure", it searches in pre-defined directories from what I understand for certain library files.
What does it do then? It creates a makefile, and the makefile contains the paths to these libraries?
Then I do "make", it compiles the source code and hard-codes the locations of the libraries? Am I correct?
I do not really understand if libraries are files with pre-defined paths or the OS somehow gives access to the libraries through system calls.
I complied something on my computer than moved it to a remote server, the executable needs MySQL libraries to work, the server has MySQL but for some reason when executing the file it tells me "can't find libmysqlclient.so.16". Is there a solution for this? Is there a way to know where is tries to locate this file or give it another path?
I can't compile it on the server since it has no compiler and I don't have root access to install packages.
Last question is if in the sequence "./configure","make","make install" the "make install" command is the only one that actually puts files outside the directory in which these files reside?
If for example the software will be installed in /usr/local/ is the "make install" command the only one that will require "sudo" before it?
Let me see if I got it correctly: "./configure" creates the Makefile according to the location of various files on your system. "make" compiles the source code according to this makefile. And "make install" moves the files to their appropriate location.
Thank you to those who had the patience to read my questions.