I just found the solution for it.
the problem got resolved by compiling with the below command
gcc -m64 -o amqsget0 amqsget0.c /opt/mqm/lib64/libmqic.so
Hi,
I have modified the sample MQ Client amqsput0.c and compiled it on client machine using the below command on solaris machine
gcc -o amqsget0 amqsget0.c /opt/mqm/lib/libmqic.so