|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Problem compiling IBM C++ sample on Linux |
« View previous topic :: View next topic » |
Author |
Message
|
kbsinc |
Posted: Mon Mar 31, 2003 4:29 pm Post subject: Problem compiling IBM C++ sample on Linux |
|
|
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 |
|
 |
tillywern |
Posted: Tue Apr 01, 2003 11:49 am Post subject: IBM code on Linux |
|
|
 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 |
|
 |
kbsinc |
Posted: Tue Apr 01, 2003 12:12 pm Post subject: Re: Problem compiling IBM C++ sample on Linux |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|