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 » C Libraries for link in example program

Post new topic  Reply to topic
 C Libraries for link in example program « View previous topic :: View next topic » 
Author Message
nicojvr
PostPosted: Thu Aug 07, 2003 5:34 am    Post subject: C Libraries for link in example program Reply with quote

Apprentice

Joined: 04 Jun 2003
Posts: 45

i am trying to compile the c example program amqput0.c. It compiles fine, but when i try to link it with the library mqic32.lib the linker just hangs. it slows down my machine something terrible. How do you reccomend i get this going. The point of it is to write a DLL using the example as a base for another file transfer server top interface with MQSeries.

Please help as this is urgent

Cheers

Nico
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Aug 07, 2003 6:00 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

I just issued the following:

cl -MT -Z7 -c -W1 -D_X86=1 -DWIN32 amqsput0.c
link -OUT:amqsput0.exe amqsput01.obj c:\wmq\tools\lib\mqic32.lib

using VisualC++ 6 and it worked fine.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
RogerLacroix
PostPosted: Thu Aug 07, 2003 10:27 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Here is a makefile (for amqsput0.c) that I have used in the past:
Code:
#
# Nmake macros for building Win32 applications
#
TARGETOS=WINNT
#
MQMDIR  = "c:\Program Files\IBM\WebSphere MQ"
MQMLIB  = "c:\Program Files\IBM\WebSphere MQ\tools\lib"
MQMINC  = "c:\Program Files\IBM\WebSphere MQ\tools\c\include"

!include <ntwin32.mak>

# Inference rules
.c.obj:
   $(cc) $(cdebug) $(cflags) $(cvars) -I$(MQMINC)  $<
.obj.exe:
   $(link) $(ldebug) $(conlflags) -out:$*.exe $** $(conlibs) user32.lib  $(MQMLIB)\mqm.lib

# Target List
All: amqsput0.exe

# Source Objects
amqsput0.obj : amqsput0.c

# Executables
amqsput0.exe : amqsput0.obj

# Clean up everything
cleanall : clean
   del *.exe

# Clean up everything except .exe files
clean:
   del *.obj

Note: For linking a client MQ program change mqm.lib to mqic32.lib.

later
Roger...
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » C Libraries for link in example program
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.