ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » Compiling API-Exit in SunOs 5.8 with GCC

Post new topic  Reply to topic
 Compiling API-Exit in SunOs 5.8 with GCC « View previous topic :: View next topic » 
Author Message
ediazinfante
PostPosted: Fri Nov 26, 2004 6:28 pm    Post subject: Compiling API-Exit in SunOs 5.8 with GCC Reply with quote

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
View user's profile Send private message
EddieA
PostPosted: Sat Nov 27, 2004 12:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
RogerLacroix
PostPosted: Mon Nov 29, 2004 8:56 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
ediazinfante
PostPosted: Mon Nov 29, 2004 1:41 pm    Post subject: Reply with quote

Newbie

Joined: 24 Jul 2004
Posts: 6
Location: Mexico

It worked!!

Thanks a lot,


- Enrique
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Compiling API-Exit in SunOs 5.8 with GCC
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.