- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Call C++ routine in shareable from C main program
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
тАО03-11-2008 12:09 AM
тАО03-11-2008 12:09 AM
I need to call, from C, routines in a shareable build from a library written in C++ (AXP and IA64 C and C++ version: 7.3-009)
My main program is in C, so I want to know if I have to call some special initialization C++ runtime routine like you have to do for C (DECC$CRTL_INIT routine) when you call C routine from others languages.
Thanks,
Jean-Fran├зois
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2008 03:37 AM
тАО03-11-2008 03:37 AM
Re: Call C++ routine in shareable from C main program
You strike me as the kind of guy who would just try first.
Did you? What seemed to be the problem?
Shareable libraries do their own initialization stuff upon their activation (LIB$FIS time, or along with main), through the LIB$INITIALIZE psect magic.
Sorry, no actual experience with this myself.
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2008 03:51 AM
тАО03-11-2008 03:51 AM
SolutionI have many shareables writen in C++ and called from various languages (C,COBOL) and have never have any initialization problems.
The shareables are linked with CXXLINK and the visible functions (which are many times wrappers) are declared in an extern "C" block.
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2008 11:18 PM
тАО03-12-2008 11:18 PM
Re: Call C++ routine in shareable from C main program
Hein,
I haven't any problem, I try just to not have any.
For example I call DECC$CRTL_INIT using LIB$INITIALIZE psect for the python shareable image.
So I was just wondering if this was not the same for C++.
Bojan,
does this mean that you don't even call DECC$CRTL_INIT in your shareable? I have thought that it's mandatory it you use C routine from another language.
JF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2008 03:46 AM
тАО03-13-2008 03:46 AM
Re: Call C++ routine in shareable from C main program
Yes, I don't call DECC$CRTL_INIT in my shareables.
Probably my shareables do not use any of the mentioned functionalities mentioned in:
http://h71000.www7.hp.com/DOC/83final/5763/5763pro_028.html#index_x_750
(but thats not realy true, I am sure that I do some I/O)
Bojan