- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shared library and C++ classes
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2011 02:36 AM
тАО01-06-2011 02:36 AM
Could someone please explain in which all cases re-compilation/re-link of the applications using the shared library is required?
It will be great if someone can point me to any document regarding the same.
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2011 02:47 AM
тАО01-06-2011 02:47 AM
SolutionIs that class only used in the shlib or all over?
Note: The use of inline functions may make any of these harder to check.
1) If you add a new data member, then all places where you create/copy/assign an object must be recompiled. Places where you access that member obviously must be recompiled.
2) Adding a non-virtual function should be ok.
3) Adding a new virtual function will cause problems if not at the end. If at the end, then the key function must be recompiled.
- Tags:
- ODR rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2011 03:13 AM
тАО01-06-2011 03:13 AM
Re: Shared library and C++ classes
Thank you for the prompt response.
>>Is that class only used in the shlib or all over?
The class is used all over. Objects of this class are instantiated by the application, and also the member functions are called.
>>Note: The use of inline functions may make any of these harder to check.
Does that mean compiler optimizations could also make this harder to check?
>>Adding a non-virtual function should be ok
If the class has some other virtual functions, then is there a possibility of any problems if a non-virtual function is added?
Also what is difference internally in adding a virtual function at that end and at some other place?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2011 12:13 AM
тАО01-07-2011 12:13 AM
Re: Shared library and C++ classes
(The word "application" includes ALL load modules used, not just the executable.)
So every place where instantiated needs to be recompiled.
>Does that mean compiler optimizations could also make this harder to check?
You can get inlining without optimizing. So either the inline keyword, inlining due to optimization in the same file or cross module inlining.
>is there a possibility of any problems if a non-virtual function is added?
No, since to access it, you would need to have the code changed anyway.
>what is difference internally in adding a virtual function at that end and at some other place?
Existing code uses a fixed offset to access the function descriptor in the virtual table and not a symbolic name. So if something is added in the middle, virtual calls will call the wrong function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2011 03:35 AM
тАО01-12-2011 03:35 AM
Re: Shared library and C++ classes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2011 03:36 AM
тАО01-12-2011 03:36 AM