Author |
Message
|
pcelari |
Posted: Tue Apr 07, 2015 11:10 am Post subject: AIX 7.1 XLC v10.1 got "collect2: library libmqic not fo |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
Hi,
I'm recompiling the amqssuba.c for use with MQI, with the following command as documented in q028350_.htm:
cc -maix64 -o subc amqssuba.c -I /usr/mqm/inc -L /usr/mqm/lib64 -lmqic
But I got the error: "collect2: library libmqic not found".
What is wrong here? All the paths are explicitly specified.
Thanks for sharing any insight. _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Apr 07, 2015 11:40 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
libmqic is part of the client install. |
|
Back to top |
|
 |
hughson |
Posted: Wed Apr 08, 2015 12:50 am Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
Might also be worth noting that even if you want to run the application as a client (which we assume you do since you are attempting the link using mqic) that with newer versions of MQ (>= 7.1) you can link with mqm and make the decision in the code with MQCNO_ options (or just allow the MQ code to try local first and then client).
As Jeff hints, check that libmqic is indeed present, in case for some reason you don't have the client installed.
Cheers
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
pcelari |
Posted: Wed Apr 08, 2015 4:04 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
mqjeff wrote: |
libmqic is part of the client install. |
thanks Jeff. I checked the installation, MQ Client is installed. Also the /usr/mqm/lib64 has all the libmqic*.a files. Even stranger is the same compile command using lmqm gets the same error, this time for libmqm:
"collect2: library libmqic not found".
I'm really lost by this. It seems something simple is missing. _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
pcelari |
Posted: Wed Apr 08, 2015 4:08 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
hughson wrote: |
... with newer versions of MQ (>= 7.1) you can link with mqm and make the decision in the code with MQCNO_ options (or just allow the MQ code to try local first and then client).
Morag |
Wow, this would be fantastic. Thanks for sharing this great new feature!
But first I have to figure out the cause of the current issue. _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
Philip Morten |
Posted: Wed Apr 08, 2015 6:26 am Post subject: |
|
|
Master
Joined: 07 Mar 2002 Posts: 230 Location: Hursley Park
|
Are you sure you are using the XLC compiler? I thought "-maix64" was a gnu compiler flag. _________________ Philip Morten
The postings on this site are my own and do not necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
pcelari |
Posted: Wed Apr 08, 2015 7:58 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
Yes, -maix64 is for XL C compiler.
It turned out the documentation has a mistake in the syntax, there should be no space between the option -L and the library path.
cc -maix64 -o subc amqssuba.c -I /usr/mqm/inc -L/usr/mqm/lib64 -lmqic
It seems the space between '-I' and include path doesn't matter, but the one between '-L' and library path prevent the compiler from finding the path. _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
|