Building 32-bit applications

 

The following section contains examples of the commands used to build 32-bit programs in various environments.

C client application, 32-bit, non-threaded

gcc -m32 -o amqsputc_32 amqsput0.c -I/opt/mqm/inc -L/opt/mqm/lib -Wl,
-rpath=/opt/mqm/lib -Wl,-rpath=/usr/lib -lmqic

C client application, 32-bit, threaded

gcc -m32 -o amqsputc_32_r amqsput0.c -I/opt/mqm/inc -L/opt/mqm/lib -Wl,
-rpath=/opt/mqm/lib -Wl,-rpath=/usr/lib -lmqic_r -lpthread

C server application, 32-bit, non-threaded

gcc -m32 -o amqsput_32 amqsput0.c -I/opt/mqm/inc -L/opt/mqm/lib -Wl,
-rpath=/opt/mqm/lib -Wl,-rpath=/usr/lib -lmqm

C server application, 32-bit, threaded

gcc -m32 -o amqsput_32_r amqsput0.c -I/opt/mqm/inc -L/opt/mqm/lib -Wl,
-rpath=/opt/mqm/lib -Wl,-rpath=/usr/lib -lmqm_r -lpthread

C++ client application, 32-bit, non-threaded

g++ -m32 -fsigned-char -o imqsputc_32 imqsput.cpp -I/opt/mqm/inc 
-L/opt/mqm/lib -Wl, -rpath=/opt/mqm/lib -L/opt/mqm/lib -Wl,
-rpath=/opt/mqm/lib -Wl,-rpath=/usr/lib -limqc23gl -limqb23gl -lmqic

C++ client application, 32-bit, threaded

g++ -m32 -fsigned-char -o imqsputc_32_r imqsput.cpp -I/opt/mqm/inc 
-L/opt/mqm/lib -Wl,-rpath=/opt/mqm/lib -L/opt/mqm/lib 
-Wl,-rpath=/opt/mqm/lib -Wl,-rpath=/usr/lib -limqc23gl_r -limqb23gl_r 
-lmqic_r -lpthread

C++ server application, 32-bit, non-threaded

g++ -m32 -fsigned-char -o imqsput_32 imqsput.cpp -I/opt/mqm/inc 
-L/opt/mqm/lib -Wl,-rpath=/opt/mqm/lib -L/opt/mqm/lib 
-Wl,-rpath=/opt/mqm/lib -Wl,-rpath=/usr/lib -limqs23gl -limqb23gl -lmqm

C++ server application, 32-bit, threaded

g++ -m32 -fsigned-char -o imqsput_32_r imqsput.cpp -I/opt/mqm/inc 
-L/opt/mqm/lib -Wl,-rpath=/opt/mqm/lib -L/opt/mqm/lib 
-Wl,-rpath=/opt/mqm/lib -Wl,-rpath=/usr/lib -limqs23gl_r -limqb23gl_r 
-lmqm_r -lpthread

C client exit, 32-bit, non-threaded

gcc -m32 -shared -fPIC -o /var/mqm/exits/cliexit_32 cliexit.c 
-I/opt/mqm/inc -L/opt/mqm/lib -Wl,-rpath=/opt/mqm/lib -Wl,-rpath=/usr/lib 
-lmqic

C client exit, 32-bit, threaded

gcc -m32 -shared -fPIC -o /var/mqm/exits/cliexit_32_r cliexit.c 
-I/opt/mqm/inc -L/opt/mqm/lib -Wl,-rpath=/opt/mqm/lib -Wl,-rpath=/usr/lib 
-lmqic_r -lpthread

C server exit, 32-bit, non-threaded

gcc -m32 -shared -fPIC -o /var/mqm/exits/srvexit_32 srvexit.c -I/opt/mqm/inc 
-L/opt/mqm/lib -Wl,-rpath=/opt/mqm/lib -Wl,-rpath=/usr/lib -lmqm

C server exit, 32-bit, threaded

gcc -m32 -shared -fPIC -o /var/mqm/exits/srvexit_32_r srvexit.c 
I/opt/mqm/inc -L/opt/mqm/lib -Wl,-rpath=/opt/mqm/lib -Wl,-rpath=/usr/lib 
lmqm_r -lpthread

 

Parent topic:

Preparing C programs


fg16420_