Preparing C programs in HP Integrity NonStop Server
This topic contains information to consider when you are preparing C programs in HP Integrity NonStop Server together with examples of the commands you use when you are building applications when you are using the OSS C compiler and when you are using the Guardian C compiler.
Precompiled C programs are supplied in the MQ_INSTALLATION_PATH/opt/mqm/samp/bin directory. To build a sample from source code, use the c89 compiler.
Library | Description |
---|---|
libmqic.so | OSS unthreaded |
libmqic_r.so | OSS multi-threaded |
mqic | Guardian |
Multi-threaded native IBM MQ applications must use the Posix User Threads (PUT) feature. There is no support for Standard Posix Threads (SPT) in this product.
Building applications using the OSS C compiler
This section contains examples of the commands that are used to build programs that are targeted for either OSS or Guardian when you are using the OSS compiler.
MQ_INSTALLATION_PATH represents the high-level directory in which IBM MQ is installed.
c89 -Wsystype=oss -o amqsputc amqsput0.c -IMQ_INSTALLATION_PATH/opt/mqm/inc
-LMQ_INSTALLATION_PATH/opt/mqm/lib -lmqic
c89 -Wsystype=oss -D_PUT_MODEL_ -o amqsputc amqsput0.c -IMQ_INSTALLATION_PATH/opt/mqm/inc
-LMQ_INSTALLATION_PATH/opt/mqm/lib -lmqic_r -lput
c89 -Wsystype=guardian -o /G/vol/subvol/amqsputc amqsput0.c -IMQ_INSTALLATION_PATH/opt/mqm/inc
-LMQ_INSTALLATION_PATH/opt/mqm/lib/G -lmqic
Building applications using the Guardian C compiler
This section contains examples of the commands that are used to build programs that are targeted for Guardian when you are using the Guardian compiler.
MQ_INSTALLATION_PATH represents the Guardian volume and subvolume in which IBM MQ is installed.
CCOMP /in AMQSPUT0/ AMQSPUTC;&
runnable,systype guardian,nolist,&
ssv0 "$system.system",&
ssv1 "MQINSTALLATION_SUBVOL",&
LD(-LMQINSTALLATION_SUBVOL -lmqic)
where LD
is eld
on NSI systems and xld
on NSX
systems.