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 IndexGeneral IBM MQ SupportMQOD_DEFAULT is not compiling on gcc version 4.8

Post new topicReply to topic
MQOD_DEFAULT is not compiling on gcc version 4.8 View previous topic :: View next topic
Author Message
paustin_ours
PostPosted: Wed Oct 31, 2018 11:37 am Post subject: MQOD_DEFAULT is not compiling on gcc version 4.8 Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 624
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
View user's profile Send private message Yahoo Messenger
rekarm01
PostPosted: Wed Oct 31, 2018 2:16 pm Post subject: Re: MQOD_DEFAULT is not compiling on gcc version 4.8 Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1315

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
View user's profile Send private message
paustin_ours
PostPosted: Thu Nov 01, 2018 4:20 am Post subject: Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 624
Location: columbus,oh

Was able to get past it. Code compiled. I think it may have been copy paste from windows
Back to top
View user's profile Send private message Yahoo Messenger
bruce2359
PostPosted: Thu Nov 01, 2018 6:05 am Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 8188
Location: US: west coast, almost. Otherwise, enroute.

Please post your solution so all of us can learn from your experience.
_________________
I would tell you a UDP joke, but you might not get it.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexGeneral IBM MQ SupportMQOD_DEFAULT is not compiling on gcc version 4.8
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.