I'm new to message queue and am attempting to compile the sample C code. I read both the README and the introduction in
but neither mentions what "-lmqcrt" is supposed to do. The reason why I'm asking is because the compiler complains it cannot find it:
# g++ -DLINUX -D_REENTRANT -I/root/MessageQueue/mq/include/ -o Producer -L/root/MessageQueue/mq/lib/ -lmqcrt Producer.c
/usr/bin/ld: skipping incompatible /root/MessageQueue/mq/lib//libmqcrt.so when searching for -lmqcrt
/usr/bin/ld: cannot find -lmqcrt
collect2: ld returned 1 exit status
where the include folder contains the mqcrt.h and lib contains libmqcrt.so
I also added the libstdc++.so to the PATH
Any help would be greatly appreciated, thanks!
On that same page that you included, there is link to the compatible compiler versions.
Please check to see if you are using a compatible compiler.
For MQ 4.3 on Linux, you must use g++ 3.2.3.
For later versions of MQ 4.4.x/4.5.x, you must use g++ 3.4.6.
I'm currently using version 4.4.4 and unfortunately cannot go back. Is there no way around using a more recent version of g++?
I am using openmq4.5 by the way.
Edited by: 883631 on Sep 16, 2011 11:59 AM
Unfortunately we are tied to those versions of g++ because the
NSS libraries that the MQ C-API library depends on use those versions of the compiler
so we must use those versions or we'll get the same error.