Discussion:
Proper way to do library linking
(too old to reply)
Jesse C
2010-01-18 01:12:08 UTC
Permalink
Looking to find the "correct" way to handle library dependencies in VC+
+.

I have multiple apps which all use a library which provides some
common functionality called MyLib. MyLib utilizes a third party
library, Lua51.

I can link Lua51.lib into MyLib, not having to link it in to every
subsequent project, or I could just not link it in MyLib and link it
into the other projects. On the one hand, linking it into MyLib would
allow for less headache for all apps dependent on MyLib. Also, linker
switches can slim down what gets linked in from MyLib, right?
(function level linking)

Am I on the right/wrong track with my thinking?

Thanks in advance,
Jesse
Tom Serface
2010-01-20 21:18:37 UTC
Permalink
I tend to make my external libs link what they need and assume if I use them
then everything I need is already included. The same is true of include
files, resources, and other things that are needed.

I don't know if this is the "proper" way to do it, but I works for me and
limits confusion about what is needed.

Tom
Post by Jesse C
Looking to find the "correct" way to handle library dependencies in VC+
+.
I have multiple apps which all use a library which provides some
common functionality called MyLib. MyLib utilizes a third party
library, Lua51.
I can link Lua51.lib into MyLib, not having to link it in to every
subsequent project, or I could just not link it in MyLib and link it
into the other projects. On the one hand, linking it into MyLib would
allow for less headache for all apps dependent on MyLib. Also, linker
switches can slim down what gets linked in from MyLib, right?
(function level linking)
Am I on the right/wrong track with my thinking?
Thanks in advance,
Jesse
Loading...