Skip to content

Commit 3240405

Browse files
committed
Added rpath directive for building. Also extra comments on the directives.
1 parent d442907 commit 3240405

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ibmmq/mqi.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ All the MQI verbs included here return a structure containing
1313
the CompletionCode and ReasonCode values. If an MQI call returns
1414
MQCC_FAILED, an error is also returned containing the MQCC/MQRC values as
1515
a formatted string.
16+
17+
The build directives for Windows assume the header and library files have
18+
been copied to a temporary location, because the default paths are not
19+
acceptable to Go (it does not like spaces or special characters like ~).
20+
21+
The build directives for Linux assume the default MQ installation path
22+
in /opt/mqm. These would need to be changed in this file if you use a
23+
non-default path.
1624
*/
1725
package ibmmq
1826

@@ -37,7 +45,7 @@ package ibmmq
3745
/*
3846
#cgo !windows CFLAGS: -I/opt/mqm/inc -D_REENTRANT
3947
#cgo windows CFLAGS: -IC:/temp/mq/include -m64
40-
#cgo !windows LDFLAGS: -L/opt/mqm/lib64 -lmqm_r
48+
#cgo !windows LDFLAGS: -L/opt/mqm/lib64 -lmqm_r -Wl,-rpath=/opt/mqm/lib64
4149
#cgo windows LDFLAGS: -L "C:/temp/mq/bin64" -lmqm -m64
4250
4351
#include <stdlib.h>

0 commit comments

Comments
 (0)