|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQOD_DEFAULT is not compiling on gcc version 4.8 |
« View previous topic :: View next topic » |
Author |
Message
|
paustin_ours |
Posted: Wed Oct 31, 2018 11:37 am Post subject: MQOD_DEFAULT is not compiling on gcc version 4.8 |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
putget.c:27:26: error: expected â)â before â.â token
strncpy(Open_descriptors.ObjectName,MQQueueRequest,MQ_Q_NAME_LENGTH);
^
trying to run this code to put message to queue
gcc -m64 -o putget putget.c -I/opt/mqm/MQ80/inc -L/opt/mqm/MQ80/lib64 -Wl,-rpath=/opt/mqm/MQ80/lib64 -Wl,-rpath=/usr/lib64 -lmqic
is it the version of the gcc? I am running this on SLES12 server. |
|
Back to top |
|
 |
rekarm01 |
Posted: Wed Oct 31, 2018 2:16 pm Post subject: Re: MQOD_DEFAULT is not compiling on gcc version 4.8 |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
paustin_ours wrote: |
is it the version of the gcc? I am running this on SLES12 server. |
Does the code compile and run with other versions of gcc, or with other compilers?
paustin_ours wrote: |
Code: |
putget.c:27:26: error: expected ")" before "." token
strncpy(Open_descriptors.ObjectName,MQQueueRequest,MQ_Q_NAME_LENGTH);
^ |
|
It is unusual that the error message had non-ASCII characters; if that is not just a copy-paste accident, then it might have to do with how gcc was configured, or maybe some $LANG environment variable.
The message itself seems to be indicating a syntax error in the code, but without more information, such as any variable or include declarations, it is hard to tell. For example, if Open_descriptors were declared as a pointer or array, then the "." operator would be unexpected. It would have to first be dereferenced in some way, such as:
Code: |
... (*Open_descriptors).ObjectName ...
... Open_descriptors[i].ObjectName ...
... Open_descriptors->ObjectName ... |
But that is just an example. |
|
Back to top |
|
 |
paustin_ours |
Posted: Thu Nov 01, 2018 4:20 am Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
Was able to get past it. Code compiled. I think it may have been copy paste from windows |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Nov 01, 2018 6:05 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Please post your solution so all of us can learn from your experience. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
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
|
|
|
|