Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22113

How to handle lib dependency while compiling?

$
0
0

Let's say that I have two static libraries : libA and libB and that libB uses libA.

For each library libX let's say that hX is libX's headers's directory and dX is libX's file's directory.

Now what happen when a user of libB wants to compile a source code C.c using libB ? Must he be aware that libB uses libA and so he must type :

gcc -IhB -IhA C.c -lA -LdA -lB -LdB

Or is there a way to make libB automatically 'says' to gcc to use libA so a user could type :

gcc -IhB -IhA C.c -LdA -lB -LdB

?


Viewing all articles
Browse latest Browse all 22113

Trending Articles



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