Work in your normal environment. Precompiled C programs are supplied in the /opt/mqm/samp/bin directory.
The following is an example of how to build the sample program amqsput0 in a non-threaded environment:
cc -Aa -D_HPUX_SOURCE -o amqsput0 amqsput0.c -lmqm
The following is an example of how to build the sample program amqsput0 in a POSIX draft 10 threaded environment:
cc -Aa -D_HPUX_SOURCE -o amqsput0 amqsput0.c -lmqm_r -lpthread
The following is an example of how to build the sample program amqsput0 in a POSIX draft 4 (DCE) threaded environment:
cc -Aa -D_HPUX_SOURCE -D_PTHREADS_DRAFT -o amqsput0 \ amqsput0.c -lmqm_d -ld4r -lcma
If you want to use the programs on a machine that has only the WebSphere MQ client for HP-UX installed, recompile the programs to link them with the client library instead. The following is an example of how to build a non-threaded client:
cc -Aa -D_HPUX_SOURCE -o amqsput0 amqsput0.c -lmqic
The following is an example of how to build a POSIX draft 10 threaded client:
cc -Aa -D_HPUX_SOURCE -o amqsput0 amqsput0.c -lmqic_r -lpthread
The following is an example of how to build a POSIX draft 4 (DCE) threaded client:
cc -Aa -D_HPUX_SOURCE -D_PTHREADS_DRAFT4 -0 amqsput0 \ amqsput0.c -lmqic_d -ld4r -lcma
The following lists the libraries you will need.
In a non-threaded environment, you must link to one of the following
libraries:
Library file | Program/exit type |
---|---|
libmqm.sl | Server for C |
libmqic.sl | Client for C |
In a threaded environment, you must link to one of the following
libraries:
Library file | Program/exit type |
---|---|
libmqm_r.sl | Server for C |
libmqic_r.sl | Client for C |
In a POSIX draft 10 threaded environment on HP-UX V11.00, you must
link to one of the following libraries:
Library file | Program/exit type |
---|---|
libmqm_r.sl | Server for C |
libmqic_r.sl | Client for C |
In a POSIX draft 4 (DCE) threaded environment on HP-UX V11.00, you
must link to one of the following libraries:
Library file | Program/exit type |
---|---|
libmqm_d.sl | Server for C |
libmqic_d.sl | Client for C |
Notes: