471,058 Members | 975 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,058 software developers and data experts.

Do we need to recompile all libraries after we modify the class?

I have a class that many libraries depend on. If I modify the class
with 'adding an argument with default value to an existing member
function', is it necessary to recompile all library?
How about 'changing destructor into virtual' to the class?
I think we don't need to recompile all library if we only add a
constructor to the class or add a data member to the library.

Jul 11 '06 #1
2 2011
Vols wrote:
I have a class that many libraries depend on. If I modify the class
with 'adding an argument with default value to an existing member
function', is it necessary to recompile all library?
How about 'changing destructor into virtual' to the class?
I think we don't need to recompile all library if we only add a
constructor to the class or add a data member to the library.
You should recompile them, but see this article on reducing
compile-time dependencies:

http://www.gotw.ca/publications/mill04.htm

Cheers! --M

Jul 11 '06 #2
mlimber wrote:
Vols wrote:
>I have a class that many libraries depend on. If I modify the class
with 'adding an argument with default value to an existing member
function', is it necessary to recompile all library?
How about 'changing destructor into virtual' to the class?
I think we don't need to recompile all library if we only add a
constructor to the class or add a data member to the library.

You should recompile them
Your build system (which is off-topic) should recompile them for you, based
on dependency analysis. If you don't have a build system, get one before
doing anything else. C++ doesn't work without a Makefile or something to
manage these dependencies for you.
but see this article on reducing
compile-time dependencies:

http://www.gotw.ca/publications/mill04.htm
Then read /Large Scale C++ Software Design/ by John Lakos, no matter what
the size of your project.

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!
Jul 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

48 posts views Thread by Chad Z. Hower aka Kudzu | last post: by
3 posts views Thread by grs | last post: by
7 posts views Thread by Gabe Covert | last post: by
10 posts views Thread by Luke Meyers | last post: by
20 posts views Thread by ramasubramanian.rahul | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.