- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Porting a windows C program to HP-UX
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
Forums
Discussions
Discussions
Discussions
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
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
11-10-2003 02:52 AM
11-10-2003 02:52 AM
I want to use this program on HP-UX.
What changes do i need to make to get this program working and if possible please explain in detail because i am new to HP-UX.
Thanks in advance
karthik
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2003 02:57 AM
11-10-2003 02:57 AM
Re: Porting a windows C program to HP-UX
If it uses windows api and functions, you will have a really tough time porting it. You'll need to go through the source code and the headers and adapt it line by line for HP-UX.
You don't say whether its a text or windows based program.
If you are using really basic C code and interacting with a terminal environment, the port will be substantially easier.
HP-UX has a totally different Windows Interface than Microsoft. The environment is different.
Hope this gets you started.
Regards,
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2003 03:11 AM
11-10-2003 03:11 AM
Re: Porting a windows C program to HP-UX
I can tell you if programs are designed from the outset to be portable then porting is rather easy but .... .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2003 03:24 AM
11-10-2003 03:24 AM
Re: Porting a windows C program to HP-UX
Let me explain in detail.This program is about putting a c structure on a IBM MQ Queue manager. There for it uses IBM provided classes and API.
When running on windows it worked fine , i guess everything was setup correctly for that environment. When i compile using cc option on HP-UX it says the following
/usr/ccs/bin/ld: Unsatisfied symbols:
MQPUT1 (first referenced in lookup.o) (code)
MQGET (first referenced in lookup.o) (code)
MQOPEN (first referenced in lookup.o) (code)
MQDISC (first referenced in lookup.o) (code)
MQCLOSE (first referenced in lookup.o) (code)
MQCONN (first referenced in lookup.o) (code)
Please tell me if i am clear.Please provide me the options for this .
Thanks
karthik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2003 03:41 AM
11-10-2003 03:41 AM
Re: Porting a windows C program to HP-UX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2003 05:14 AM
11-10-2003 05:14 AM
Re: Porting a windows C program to HP-UX
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2003 05:20 AM
11-10-2003 05:20 AM
SolutionThe above calls are implemented in /opt/mqm/libmqma.sl file. Add this to SHLIB_PATH or LD_LIBRARY_PATH (32 and 64 bit). Add -L option to the compiler with /opt/mqm and end with -lmqm.
HTH,
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2003 05:20 AM
11-10-2003 05:20 AM
Re: Porting a windows C program to HP-UX
HTH,
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2003 06:16 AM
11-10-2003 06:16 AM
Re: Porting a windows C program to HP-UX
That what great you pointing the exact libraries i wanted.But i still need more details i guess to compile.
I am posting my .mak file for this program.Can u tell me where i need to change the path
.SUFFIXES:
.all: \
.\lookup.exe
.\lookup.obj: \
.\lookup.c
@echo " Compile "
icc.exe /Sa /Fo".\%|fF.obj" /C .\lookup.c
.\lookup.exe: \
.\lookup.obj \
{$(LIB)}mqm.lib
@echo " Link "
icc.exe @<<
/B" /de /nobrowse /code:RX /data:RW"
/B" /def"
/B" /def:mqm.lib"
/Felookup.exe
mqm.lib
.\lookup.obj
<<
And i did not quite understand the compile options..
Please explain me in details.. I am quite dumb in these issues..
Again.. Thanks in advance
Karthik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2003 06:49 AM
11-10-2003 06:49 AM
Re: Porting a windows C program to HP-UX
I dont know anything in the windows world. As I see, there is a lot of difference in the way you write makefiles in windows and unix.
I can suggest you to change the LIB. Whereever its pointing, the /opt/mqm/lib is not in that path.
You can read this guide
http://docs.hp.com/hpux/onlinedocs/B2355-90655/B2355-90655.html
There is no compile time options. The code compiles well. The linker needs to resolve the symbols and it is not finding the appropriate library. So you provide the details to the linker by path (-L /opt/mqm/lib), the library (-lmqm) and the SHLIB_PATH(for 32 bit OS) or LD_LIBRARY_PATH(for 64bit) for the dynamic loader.
Get an introduction to makefiles from here
http://www.eng.hawaii.edu/Tutor/Make/
If any specific questions, revert back.
HTH,
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2003 02:58 PM
11-10-2003 02:58 PM
Re: Porting a windows C program to HP-UX
cc -Aa -D_HPUX_SOURCE -o amqsput0 amqsput0.c -lmqm
This is in the "Builing your application on HP-UX" chapter.
As Umpathy has it, you need to link to the libmqm.sl shared library. Try using a similar command line to the one above to test it, then modify your .mak file. Could it be that the library is referenced as mqm.lib instead of libmqm.sl? The -lmqm is shorthand for libmqm.sl (must be found in path pointed to by the env. vars mentioned in Umpathy's post)
Good luck!
Seth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2003 03:09 AM
11-11-2003 03:09 AM
Re: Porting a windows C program to HP-UX
All of you guys were very helpful . I tried
cc -o lookup lookup.c -lmqm
and it worked.
Thanks
Karthik