Quantcast
Channel: Installation and Deployment
Viewing all articles
Browse latest Browse all 22112

Linking libraries during build vs. install

$
0
0
Hello all. I have a problem regarding linking of shared libraries (I’ll refer to them as .so files since I’m on linux). Let’s say I have project A and project B. Project A builds as an executable file and project B builds as a .so My project tree looks like this: - Root - – A - – B And this is also what it looks like in my build directory. These projects installs to /usr/bin and /usr/lib respectively. Now, how do I go about to make it so that I can link to the installed version of project B (i.e. /usr/lib/B.so) when I compile project A? The chain of operations look like this: build B, build A, install B, install A. But if I declare LIBS += -L/usr/lib -lB in project A, it will look for the installed library, which isn’t there during compile. Should I declare something like LIBS += -L<buildDirectory>/lib -L/usr/lib -lB? I’m sorry if this is too incoherent, but I hope someone will understand my problem!

Viewing all articles
Browse latest Browse all 22112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>