Author |
Message
|
karthik |
Posted: Mon Nov 10, 2003 9:26 am Post subject: Compiling and linking error |
|
|
 Centurion
Joined: 17 Oct 2003 Posts: 114
|
Hi
I have a MQ C program on windows.I am trying to migrate it to HP-UX.
When i tried to compile on HP-UX i got the following error message
/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)
On a HP message board i got this reply.
Quote: |
They are probably in a library which you need. Take a look at the libraries that you are linking with on Windows and try to determine which one has these functions and then see if there is an equivalent library for HP-UX. |
I am not able to find where this library would be on HP-UX.
Can somebody help me in finding where this libraries would on HP-UX.
Thanks
karthik |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Nov 10, 2003 9:56 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I'd say you aren't linking against the MQ library.
Post your compilation command, or make file - the one you're using on the HP. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
karthik |
Posted: Mon Nov 10, 2003 10:21 am Post subject: |
|
|
 Centurion
Joined: 17 Oct 2003 Posts: 114
|
Thanks Jeff
this is the make file
.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"
I used "cc" option to compile this file |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Nov 10, 2003 10:33 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Hopefully someone more familiar with the HP environment will chime in and tell me where I'm wrong, and where you're wrong too, but you might need to put {$(LIB)}mqm.lib with your compile as well as your link.
And you might need to specify the full path to mqm.lib, instead of using the {$(LIB)} directive. Or make sure the full path is part of your LIB paths.
Try searching through this forum to see what other people have said about compiling stuff on HP, too. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mrlinux |
Posted: Mon Nov 10, 2003 12:36 pm Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
Well a couple of questions.
you dont need the ".lib" at the end of mqm.lib, if anything add ".sl"
1) IS MQSeries Server or Client installed ???
2) Check that lib has link in /usr/lib
ll /usr/lib/libmqm.sl
3) Do you have access to another C compiler than the default compiler,
it doesnt work very well except for Kernel compiles ????
If you have just client installed you need to change mqm to mqic _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
Leafar |
Posted: Tue Nov 11, 2003 9:41 am Post subject: |
|
|
 Acolyte
Joined: 03 Apr 2003 Posts: 74 Location: Buenos Aires
|
In hp try this command
cc lookup.c -o lookup.exe -lmqm
Saludos
Rafael
PS: If this works I can help you with your makefile. |
|
Back to top |
|
 |
|