HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Calling C++ from HP Pascal
Operating System - HP-UX
1835004
Members
2294
Online
110073
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
11-06-2003 02:56 AM
11-06-2003 02:56 AM
Calling C++ from HP Pascal
I am unclear whether it is possible to call C++ routines from within HP Pascal routines. I need information about doing it the other way around. Is it possible?
I get the error:
/usr/lib/dld.sl: Unresolved symbol: __shlinit (code) from /usr/local/pcm170/lib
pcmsrv.sl
When I run my program...
Any info GREATLY appreciated.
Chris Irwin
coi@cirwin.com
I get the error:
/usr/lib/dld.sl: Unresolved symbol: __shlinit (code) from /usr/local/pcm170/lib
pcmsrv.sl
When I run my program...
Any info GREATLY appreciated.
Chris Irwin
coi@cirwin.com
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2003 03:25 AM
11-06-2003 03:25 AM
Re: Calling C++ from HP Pascal
It depends. The most common problems surround global constructors and destructors which depend upon _main(). Look in /opt/aCC/html/C/guide for otherlangs.htm. Here is an excerpt from that file:
---------------
The main() Function
In general, when mixing C++ modules with modules in HP Pascal and HP FORTRAN 90, the overall control of the program must be written in C++. In other words, the main() function must appear in some C++ module and no other outer block should be present.
If you wish to have a main() function in a module other than a C++ module, you can add a call to _main() as the first non-declarative statement in the module. However, if you use this method, your code is not portable.
------------------------
You will find that you will fight far fewer battles if you make a slight change in your thinking. Make what is now you Pascal program a procedure e.g. change
Program My_Program
....
END.
to
Procedure My_Program;
.....
end; {My_Program}
Your then have a small C++ main that calls your Pascal My_Program and you are done. It's far, far easier to link Pascal to C++ than the other way round.
---------------
The main() Function
In general, when mixing C++ modules with modules in HP Pascal and HP FORTRAN 90, the overall control of the program must be written in C++. In other words, the main() function must appear in some C++ module and no other outer block should be present.
If you wish to have a main() function in a module other than a C++ module, you can add a call to _main() as the first non-declarative statement in the module. However, if you use this method, your code is not portable.
------------------------
You will find that you will fight far fewer battles if you make a slight change in your thinking. Make what is now you Pascal program a procedure e.g. change
Program My_Program
....
END.
to
Procedure My_Program;
.....
end; {My_Program}
Your then have a small C++ main that calls your Pascal My_Program and you are done. It's far, far easier to link Pascal to C++ than the other way round.
If it ain't broke, I can fix that.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP