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 Installation/Configuration Support » From a NT MQ client, impossible to put a .txt file in a queu

Post new topic  Reply to topic Goto page 1, 2  Next
 From a NT MQ client, impossible to put a .txt file in a queu « View previous topic :: View next topic » 
Author Message
lejal
PostPosted: Wed Apr 17, 2002 7:10 am    Post subject: Reply with quote

Novice

Joined: 16 Apr 2002
Posts: 13

I modified the programm amqsput0.c to be able to put a complete file toto.txt in a queue. I imported the library mqm.lib.
When I try to build the amqsput0.c file, I get an error : undefined reference to "MQCONN" and this message for all MQ command.
Any idea ?
Thierry
Back to top
View user's profile Send private message
mqonnet
PostPosted: Wed Apr 17, 2002 7:24 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

Probable cause would be that mqm.lib is not linked properly or are using the wrong version of it. Are you using C compiler from command prompt, or are you using Visual Studio. If you are using the latter you need to add mqm.lib to project->settings->link->library module.

Cheers.
Kumar

_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
lejal
PostPosted: Wed Apr 17, 2002 11:47 pm    Post subject: Reply with quote

Novice

Joined: 16 Apr 2002
Posts: 13

That's exactly the problem. This library isn't linked properly. But I don't use Visual Studio and I don't build my programs from the prompt. My compiler is called Dev-C++ 4 by "Bloodshed". It's a freeware. Do you know it?
I have copied the file called mqm.LIB in the Dev-C++ lib directory and I've still got the same error message given by the linker : "undefined reference to "MQCONN", undefined reference to "MQOPEN", etc...
What could be the solution? Thanks.
Back to top
View user's profile Send private message
lejal
PostPosted: Thu Apr 18, 2002 1:37 am    Post subject: Reply with quote

Novice

Joined: 16 Apr 2002
Posts: 13

Hi!
Thank you for your tip but it still doesn't work. I have built this program with another compiler and ther's the same problem. So, I tried to build a source file of an executable supplied by MQSeries and there's the same linker errors again. I'm really lost...
Back to top
View user's profile Send private message
vedbhat
PostPosted: Thu Apr 18, 2002 1:48 am    Post subject: Reply with quote

Disciple

Joined: 19 Mar 2002
Posts: 186
Location: Singapore

Hi,

1) In the LIB Environment variable add "X:...MQSeriestoolslib"
2) In the INCLUDE Environment variable add "X:..MQSeriestoolscinclude;X:..MQSeriestoolscplusinclude;"

Where X is the drive and directory where MQSeries is installed

Regards
Ved

[ This Message was edited by: vedbhat on 2002-04-18 02:50 ]

[ This Message was edited by: vedbhat on 2002-04-18 02:52 ]
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
lejal
PostPosted: Thu Apr 18, 2002 1:53 am    Post subject: Reply with quote

Novice

Joined: 16 Apr 2002
Posts: 13

There's no LIB variable on my system and I'm not allowed to create any (I'm not the administrator). Is there another solution?
Thank you for your help.
Back to top
View user's profile Send private message
vedbhat
PostPosted: Thu Apr 18, 2002 1:55 am    Post subject: Reply with quote

Disciple

Joined: 19 Mar 2002
Posts: 186
Location: Singapore

Hi,

What is the OS that you are using.

Regards
Ved
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
mqonnet
PostPosted: Thu Apr 18, 2002 3:30 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

If you are running from the prompt using your DEV C++ compiler, there should be a flag to supply Library paths. Check the compiler flags through it's help. If it is an IDE, then there must be a way out in it to specify the Library paths.
Check them out.

Hope this helps.
Cheers.
Kumar

_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mrlinux
PostPosted: Thu Apr 18, 2002 3:54 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

Well reading your subject you used the word CLIENT does that mean you have MQ Client installed, if so the correct lib to link on NT is mqic32.lib not mqm.lib

_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
lejal
PostPosted: Thu Apr 18, 2002 4:21 am    Post subject: Reply with quote

Novice

Joined: 16 Apr 2002
Posts: 13

Sorry for having made you wait for my answer.
I'm using Windows 2000. Finally, I've found the environment variable LIB and I set it like you told me.
I have checked all the Libraries paths on my IDE. And with the mqic32.lib there is the same errors. I'm beginning to think that someone put a spell on me to prevent me to work.
I'm really lost. I've never met such a strange problem and I have built thousands of programs yet!
Once again thank you so much for trying to help me!
Back to top
View user's profile Send private message
mrlinux
PostPosted: Thu Apr 18, 2002 4:41 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

I dont know your C++/C Compiler but is there a switch to turn off the C++ Name Mangling ???

_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
lejal
PostPosted: Thu Apr 18, 2002 4:47 am    Post subject: Reply with quote

Novice

Joined: 16 Apr 2002
Posts: 13

What is the C++ Name mangling?
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Apr 18, 2002 9:04 am    Post subject: Reply with quote

Jedi Knight

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

I don't recognize the compiler that you are using as one of the supported compilers. If you go to:

http://www-4.ibm.com/software/ts/mqseries/platforms/supported/mqseries_for_winnt2000_5_2.html

you can get a list of the supported compilers.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
mrlinux
PostPosted: Thu Apr 18, 2002 9:12 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

One of the c++ features of have the same function name with different parameters
requires the function names be modified at link link time to some mangled name
This is just a made up sample to give you and idea about mangling, actual mangled names look real strange and every c++ compiler appears to do it differently (bright idea)
ie add(int,int)
add(long,long)

mangled names addINT
addLONG

Check cmqc.h header file find the following
does your c++ compiler generate the ___cplusplus symbol if so then name mangling isnt the issue if not then remove the if defined

#if defined(__cplusplus)
extern "C" {
#endif

_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries

[ This Message was edited by: mrlinux on 2002-04-18 10:21 ]
Back to top
View user's profile Send private message Send e-mail
StefanSievert
PostPosted: Thu Apr 18, 2002 12:35 pm    Post subject: Reply with quote

Partisan

Joined: 28 Oct 2001
Posts: 333
Location: San Francisco

OK, I am going to add to that lengthy discussion...
I just downloaded the compiler and tried it; with no problems.
If you open the Project options (Alt-P), you will see an entry field at the bottom titled: 'Linker Options/Optional Libs or Object files'. If you put in c:msmqctoolslibmqic32.lib, replacing the path with your path to the library, it should work.
Cheers,
Stefan

_________________
Stefan Sievert
IBM Certified * WebSphere MQ
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » From a NT MQ client, impossible to put a .txt file in a queu
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.