Sun GlassFish Message Queue 4.4 Developer's Guide for C Clients

To Compile and Link on Solaris OS

CC -compat=5 -mt -DSOLARIS -Iheader_path -o Producer \\
    -Lruntime_path -lmqcrt Producer.c

where header_path and runtime_path are the paths to the Message Queue header file and runtime shared library appropriate to your installation method and processor architecture, as listed in Table 1–1. For example, when using an installation from SVR4 packages on a Solaris x86 64–bit platform, you would specify /opt/SUNWimq/include as header_path and /opt/SUNWimq/lib/amd64 as runtime_path.

For 64-bit support on either the SPARC or x86 processor architecture, you must also specify the -xarch compiler option:

For example, to compile and link the example application in an installation from SVR4 packages on Solaris SPARC 64–bit, you would use the following command:

CC -compat=5 -mt -xarch=v9 -DSOLARIS -I/opt/SUNWimq/include -o Producer \\
   L/opt/SUNWimq/lib/sparcv9 -lmqcrt Producer.c