Making an application against different system libraries
Hello, I'm new to Linux development and have a question about building an application on one machine that is intended to run on another.
I would like to build an application that uses a set of system libraries that are in a directory other than /lib or /usr/lib. It's similar to a cross compiling mechanism, except both host and target are linux machines (x86) with different versions of Linux. I did try and set the environment variable LD_LIBRARY_PATH in one of the configuration files, but I don't think it worked because when I used ldd on the image, the system files that displayed were from /usr/lib and /lib and not from the paths I specified in LD_LIBRARY_PATH. Preferably, I would like to change this during the invocation of make. What would you suggest?
Please advise, thank you in advance, any help is appreciated,