|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Compiling API-Exit in SunOs 5.8 with GCC |
« View previous topic :: View next topic » |
Author |
Message
|
ediazinfante |
Posted: Fri Nov 26, 2004 6:28 pm Post subject: Compiling API-Exit in SunOs 5.8 with GCC |
|
|
Newbie
Joined: 24 Jul 2004 Posts: 6 Location: Mexico
|
I am trying to compile an API-Exit in SunOs 5.8 with GCC. I have compiled and linked it successfully but it fails when trying to load it.
Code: |
AMQ7214: The module for API Exit 'CmdsvrLog' could not be loaded.
EXPLANATION:
The module '/var/mqm/exits/cmdsvrlog' for API Exit 'CmdsvrLog' could not be
loaded for reason xecU_S_LOAD_FAILED.
ACTION:
Correct the problem with the API Exit module 'CmdsvrLog' |
The command I used for compiling is:
Code: |
"/usr/local/bin/gcc -fPIC -D_REENTRANT -lthread -o cmdsvrlog.o cmdsvrlog.c -L/opt
/mqm/lib -shared -symbolic -lmqmzf -lmqm -lmqmcs -lmqmzse
/usr/ccs/bin/ld -L$LIB -dy -G -lmqmzf cmdsvrlog.o -o cmdsvrlog |
I am sure that the code works fine, because I have successfully compiled and used it in W2K and AIX platforms; although the compilation was not with gcc.
I appreciate your help. |
|
Back to top |
|
 |
EddieA |
Posted: Sat Nov 27, 2004 12:06 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Language compilers and assemblers for WebSphere MQ for Solaris Language
C++ Sun WorkShop compiler C++, V5.0, V6.0
C Sun WorkShop compiler C, V5.0, V6.0
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
RogerLacroix |
Posted: Mon Nov 29, 2004 8:56 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
Personally, I like the 2 step approach. Here is the makefile that I used to compile mirrorq with GCC on Solaris:
Code: |
# This Makefile makes the mirrorq shared object (Sun Solaris)
#
all: mirrorq
# set TARGET to the name of the executable to create
TARGET = mirrorq
# CC defines the compiler.
CC = gcc
# Set CCOPTS - the compiler options.
CCOPTS = -c -DUNIX -MD
DEFS= -DTRACE -DOLD_IOSTREAM -Dsun -Dsparc -DBSD_COMP -DUNIX -DSolaris2=6
# MQM library directory
MQMLIB = /usr/lib
# set LIBS to list all the libraries ld should link with.
LIBS = -lmqm -lmqmcs -lmqmzse -lmqmzf -lc -lm -lsocket
# set OBJS to list all required subroutines
OBJS = mirrorq.o
mirrorq : $(OBJS)
$(CC) -G -o mirrorq $(OBJS) -mt -L$(MQMLIB) -L. $(LIBS)
mirrorq.o : mirrorq.c
.c.o:
$(CC) $(CCOPTS) -I. -I/usr/include -I/usr/include/sys -I/usr/lpp/mqm/inc $< |
Hope that helps.
Regards,
Roger Lacroix _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
ediazinfante |
Posted: Mon Nov 29, 2004 1:41 pm Post subject: |
|
|
Newbie
Joined: 24 Jul 2004 Posts: 6 Location: Mexico
|
It worked!!
Thanks a lot,
- Enrique |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|