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 » General IBM MQ Support » Problem compiling IBM C++ sample on Linux

Post new topic  Reply to topic
 Problem compiling IBM C++ sample on Linux « View previous topic :: View next topic » 
Author Message
kbsinc
PostPosted: Mon Mar 31, 2003 4:29 pm    Post subject: Problem compiling IBM C++ sample on Linux Reply with quote

Newbie

Joined: 07 Apr 2002
Posts: 6
Location: Harrisburg, PA.

I am trying to complie the IBM supplied C++ sample imqwrld program on RedHat Linux 8.0 using the GNU g++ version 3.0.3 compiler. I have WebMQ v5.3 server installed. Following the instructions in the IBM WebMQ Using C++ manual I issue the following command from the shell:

g++ -o /home/kbsinc/bin/imqwrld /home/kbsinc/cpp_source/imqwrld.cpp -fsigned-char -I/opt/mqm/inc -L/opt/mqm/lib/3.0.3 -Wl,-rpath/opt/mqm/lib/3.0.3 -limqb23gl -limqs23gl

The compiler generates the error: /usr/bin/ld: bad -rpath option
collect2: ld returned 1 exit status

If I remove the -Wl,-rpath option, the compiler generates the error: /usr/bin/ld: warning: libstdc++.so.3, needed by /opt/mqm/lib/3.0.3/libimqb23gl.so, not found (try using -rpath or -rpath-link).

I have this exact sample compiled and working successfully on Windows 2000 using MS Visual C++. Can anyone point me in the right direction? Thanks...
_________________
cheers,
rick
Back to top
View user's profile Send private message Send e-mail
tillywern
PostPosted: Tue Apr 01, 2003 11:49 am    Post subject: IBM code on Linux Reply with quote

Centurion

Joined: 28 Jan 2003
Posts: 109
Location: Colorado

It appears that your problem is specifically related to compiling and linking than on the source itself. I have not had this issue when installing or using MQ in Linux.

I am running
$ mqver
MQSeries Version: 520
CMVC level: p000-L001106
BuildType: IKAP - (Production)

So I don't have 5.3 yet... In the mail.... So I do not have the 3.0.3 library set... But I ran your compile statement and noticed that I got the same error you did.... add a space after the -rpath before the library directry.... This then gave me a different error... Because I do not have the 3.0.3 libraries...

So I that if you have the directory 3.0.3 under the /opt/mqm/lib directory then you should be ok. So try it with the space in there and see if it works.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
kbsinc
PostPosted: Tue Apr 01, 2003 12:12 pm    Post subject: Re: Problem compiling IBM C++ sample on Linux Reply with quote

Newbie

Joined: 07 Apr 2002
Posts: 6
Location: Harrisburg, PA.

Leaving a space after the -rpath option and before the directory just causes the -rpath option to be ignored and produces the same error as documented in original post:
" /usr/bin/ld: warning: libstdc++.so.3, needed by /opt/mqm/lib/3.0.3/libimqb23gl.so, not found (try using -rpath or -rpath-link). "

The /opt/mqm/lib/3.0.3 directory and shared library members exist as well. Thanks...
_________________
cheers,
rick
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Problem compiling IBM C++ sample on Linux
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.