473,387 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 2156
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Alf P. Steinbach | last post by:
The fifth part of my attempted Correct C++ tutorial is now available, although for now only in Word format (use free Open Office if no Word), and also, it's not yet been reviewed at all -- ...
4
by: techme | last post by:
I am surprised at how little info there is on this topic. We converted to DB2 v8.1.1.72 painlessly a few months ago. For specific reasons, we stayed on 32-bit. Our OS is AIX 5.2 and our hardward...
48
by: Chad Z. Hower aka Kudzu | last post by:
A few of you may recognize me from the recent posts I have made about Indy <http://www.indyproject.org/indy.html> Those of you coming to .net from the Delphi world know truly how unique and...
3
by: grs | last post by:
Can a class library have a app.config file. Reason for asking is that the microsoft application blocks all read from myApp.exe.config. How can you use the application blocks if you do not have an...
7
by: Gabe Covert | last post by:
I'm attempting to implement a 3rd party COM library in a C# application, and have run up against the following problem in my development. I am trying to use a particular method call of an object,...
10
by: Luke Meyers | last post by:
So, just a little while ago I had this flash of insight. It occurred to me that, while of course in general there are very good reasons for the conventional two-file header/implementation...
20
by: ramasubramanian.rahul | last post by:
hi folks i have a peculiar problem. i have to allocate more than size_t consequtive bytes on a system . after i do a malloc .. i am unable to do a realloc because it takes size_t as a new size...
6
by: StephQ | last post by:
I need to implement an algorithm that takes as input a container and write some output in another container. The containers involved are usually vectors, but I would like not to rule out the...
11
by: Benoit Lefebvre | last post by:
Anyone have hints for me on how I can disassemble a binary file using objdump, do some modifications and then recompile everything ? thanks, --Ben
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.