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 a C++ application

Post new topic  Reply to topic
 Compiling a C++ application « View previous topic :: View next topic » 
Author Message
platondaniel
PostPosted: Mon Aug 05, 2002 12:05 am    Post subject: Compiling a C++ application Reply with quote

Novice

Joined: 04 Aug 2002
Posts: 12

Hello !

The project that i am currently working on involves an older version of MQSeries, the 5.1 for Windows NT version.
I have tried to compile one of the samples with several compilers of several IDEs like Dev-C++ (g++ compiler), MS Visual C++ 6.0 and, finally, the Borland C++ 3.1 compiler. The problem is, the sources compiles nicely, but the linker returns an "Undefined symbol" error. Now, what do I have to do to make that program work (I mean... if the samples included in the package doesn't work, then how's MY program going to ?). Can someone tall me the exact configuration I have to use for bcc ?

Thx, DAN
Back to top
View user's profile Send private message Yahoo Messenger
jhalstead
PostPosted: Mon Aug 05, 2002 12:55 am    Post subject: Reply with quote

Master

Joined: 16 Aug 2001
Posts: 258
Location: London

As far as I'm aware MSVC++ is the only supported compiler. Are you linking to the mqm.lib after compilation?

Jamie

If you want to compile with the command line cl & link utilities then the following should work...

cl /nologo /W3 /GX /O2 /D "WIN32" /D"NDEBUG" /D "_CONSOLE" [sourcefile.c] /YX /c

link kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib mqm.lib /nologo /subsystem:console /incremental:no [sourcefile.obj]
Back to top
View user's profile Send private message Send e-mail
platondaniel
PostPosted: Mon Aug 05, 2002 1:04 am    Post subject: Reply with quote

Novice

Joined: 04 Aug 2002
Posts: 12

Thx a lot, but i've solved THIS problem using VC++ 6.0. THE OTHER problem is that the program returns error code 2059. Consulting the logs in \MQSeries\errors i found this

08/05/2002 12:24:30
AMQ9203: A configuration error for TCP/IP occurred.

EXPLANATION:
Error in configuration for communications to host . Allocation of a TCP/IP
conversation to host was not possible.
ACTION:
The configuration error may be one of the following:

1.If the communications protocol is LU 6.2, it may be that one of the
transmission parameters (Mode, or TP Name) is incorrect. Correct the error
and try again. The mode name should be the same as the mode defined on host
. The TP name on should be defined.

2.If the communications protocol is LU 6.2, it may be that an LU 6.2 session
has not been established. Contact your systems administrator.

3.If the communications protocol is TCP/IP, it may be that the host name
specified is incorrect. Correct the error and try again.

4.If the communications protocol is TCP/IP, it may be that the host name
specified cannot be resolved to a network address. The host name may not be
in the nameserver.

The return code from the TCP/IP (connect) call was 10049 (X'2741').

Record the error values and tell the system administrator.
-------------------------------------------------------------------------------


What's the problem here ?! The QM is up and running, the comunicating channles too ? is there a problem with my MQSeries configuration -- the client and the server are on the same machine and i have only a server connection channel configured (default). Do i have to define another channels ?
Back to top
View user's profile Send private message Yahoo Messenger
bower5932
PostPosted: Mon Aug 05, 2002 9:15 am    Post subject: Reply with quote

Jedi Knight

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

If I was going to guess at what was wrong, I'd say that you don't have access to the correct environment variables from the MSVC IDE. Or, you don't have your listener running. You can test the listener by getting to a command line:

set MQSERVER=SYSTEM.DEF.SVRCONN/TCP/(your hostname)
amqsputc SYSTEM.DEFAULT.LOCAL.QUEUE (your qmgr)

If this works, the listener is running. If not, start the listener and try again. Once you have the listener running, I'd suspect the environment variables in the IDE.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Compiling a C++ application
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.