Building 64-bit applications

 

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

C client application, 64-bit, non-threaded

gcc -m64  -o amqsputc_64 amqsput0.c -I/opt/mqm/inc -L/opt/mqm/lib64 -Wl,
-rpath=/opt/mqm/lib64 -Wl, -rpath=/usr/lib64 -lmqic 

C client application, 64-bit, threaded

gcc -m64  -o amqsputc_64_r amqsput0.c -I/opt/mqm/inc -L/opt/mqm/lib64 -Wl,
-rpath=/opt/mqm/lib64 -Wl, -rpath=/usr/lib64 -lmqic_r -lpthread 

C server application, 64-bit, non-threaded

gcc -m64  -o amqsput_64 amqsput0.c -I/opt/mqm/inc -L/opt/mqm/lib64 -Wl,
-rpath=/opt/mqm/lib64 -Wl, -rpath=/usr/lib64 -lmqm 

C server application, 64-bit, threaded

gcc -m64  -o amqsput_64_r amqsput0.c -I/opt/mqm/inc -L/opt/mqm/lib64 -Wl,
-rpath=/opt/mqm/lib64 -Wl, -rpath=/usr/lib64 -lmqm_r -lpthread 

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

g++ -m64 -fsigned-char -o imqsputc_64 imqsput.cpp -I/opt/mqm/inc 
-L/opt/mqm/lib64 -Wl,-rpath=/opt/mqm/lib64 -L/opt/mqm/lib64 -Wl,
-rpath=/opt/mqm/lib64 -Wl,-rpath=/usr/lib64 -limqc23gl -limqb23gl -lmqic 

C++ client application, 64-bit, threaded

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

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

g++ -m64 -fsigned-char  -o imqsput_64 imqsput.cpp -I/opt/mqm/inc 
-L/opt/mqm/lib64 -Wl,-rpath=/opt/mqm/lib64 -L/opt/mqm/lib64 -Wl,
-rpath=/opt/mqm/lib64 -Wl,-rpath=/usr/lib64 -limqs23gl -limqb23gl -lmqm 

C++ server application, 64-bit, threaded

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

C client exit, 64-bit, non-threaded

gcc -m64 -shared -fPIC  -o /var/mqm/exits64/cliexit_64 cliexit.c 
-I/opt/mqm/inc -L/opt/mqm/lib64 -Wl,-rpath=/opt/mqm/lib64 -Wl,
-rpath=/usr/lib64 -lmqic 

C client exit, 64-bit, threaded

gcc -m64 -shared -fPIC  -o /var/mqm/exits64/cliexit_64_r cliexit.c 
-I/opt/mqm/inc -L/opt/mqm/lib64 -Wl,-rpath=/opt/mqm/lib64 -Wl,
-rpath=/usr/lib64 -lmqic_r -lpthread 

C server exit, 64-bit, non-threaded

gcc -m64 -shared -fPIC  -o /var/mqm/exits64/srvexit_64 srvexit.c 
-I/opt/mqm/inc -L/opt/mqm/lib64 -Wl,-rpath=/opt/mqm/lib64 -Wl,
-rpath=/usr/lib64 -lmqm 

C server exit, 64-bit, threaded

gcc -m64 -shared -fPIC  -o /var/mqm/exits64/srvexit_64_r srvexit.c 
-I/opt/mqm/inc -L/opt/mqm/lib64 -Wl,-rpath=/opt/mqm/lib64 -Wl,
-rpath=/usr/lib64 -lmqm_r -lpthread

 

Parent topic:

Preparing C programs


fg16430_