Click here to Skip to main content
15,890,378 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a lib and want to add a new function in one of its classes. This will be used only by the new client I am building.
However, the library is commonly shared between VOBs and used by many clients.

My question is:
1) Do I need to recompile and redeploy all of these clients, even though they are not calling this new function or otherwise unaware of this function?
2) Is there a way around this?

On a broader stroke: What kind of changes in lib .h, .cpp require clients to recompile?



Thanks in advance
Posted
Updated 10-Mar-11 3:52am
v2
Comments
mbue 10-Mar-11 9:52am    
You have to recompile all they modules using your .lib. For better scaling of your code you should use COM.
Regards.
Chris Meech 10-Mar-11 10:22am    
Are your client programs linking to your library dynamically or statically?
raman69 10-Mar-11 11:28am    
Links Dynamically
Chris Meech 10-Mar-11 11:48am    
Thanks. If the other clients had been statically linked, you could get by without doing anything for them. Since they dynamically link, you do have to be careful of the .h file changes. Would it not be possible to put your new functions in another library?

Clients should only need to recompile if anything in the .h file changes; that is the interface between the client code and the library. If they need to use a newer version of the library (bug fixes etc.) then they should just need to re-link to the new library.
 
Share this answer
 
if the interface changes then you need to recompile, you cant really go around this unless you menage to add the functionality without changing the interface.

to order to solve this most people use a plugin based architecture. (example: COM)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900