|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	| c++ compile issue ImqStr | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | mqjeff | 
			  
				|  Posted: Thu Apr 13, 2017 7:32 am    Post subject: |   |  |  
		  | Grand Master
 
 
 Joined: 25 Jun 2008Posts: 17447
 
 
 | 
			  
				| 
   
	| balaraju wrote: |  
	| Thanks Jeff.. we tried these options but no luck  May be issue with compiler and code compatibility... |  
 Which options?
 
 There are 24 choices on that page.
 _________________
 chmod  -R ugo-wx /
 |  |  
		  | Back to top |  |  
		  |  |  
		  | balaraju | 
			  
				|  Posted: Tue Apr 18, 2017 2:13 am    Post subject: |   |  |  
		  | Apprentice
 
 
 Joined: 06 Feb 2017Posts: 29
 
 
 | 
			  
				| So we consulted our c++ expert. There is this variable MQLONG and we are appending this with a string, which was giving error unable to find MQLONG. So she assigned this value of MQLONG to a variable which is LONG and this resolved the issue...  |  |  
		  | Back to top |  |  
		  |  |  
		  | gbaddeley | 
			  
				|  Posted: Tue Apr 18, 2017 4:34 pm    Post subject: |   |  |  
		  |  Jedi Knight
 
 
 Joined: 25 Mar 2003Posts: 2538
 Location: Melbourne, Australia
 
 | 
			  
				| 
   
	| balaraju wrote: |  
	| So we consulted our c++ expert. There is this variable MQLONG and we are appending this with a string, which was giving error unable to find MQLONG. So she assigned this value of MQLONG to a variable which is LONG and this resolved the issue...  |  MQLONG is not a variable, it is a data type, a 32 bit signed integer. Obviously this has no relationship to strings. Can you provide a code fragment?
 _________________
 Glenn
 |  |  
		  | Back to top |  |  
		  |  |  
		  | balaraju | 
			  
				|  Posted: Fri Apr 28, 2017 1:04 am    Post subject: |   |  |  
		  | Apprentice
 
 
 Joined: 06 Feb 2017Posts: 29
 
 
 | 
			  
				| sorry for the delay. Below is the snippet 
 Earlier :
 MQLONG          A;
 MQLONG          B;
 
 After casting
 long            A;
 long            B;
 |  |  
		  | Back to top |  |  
		  |  |  
		  | gbaddeley | 
			  
				|  Posted: Sun Apr 30, 2017 4:41 pm    Post subject: |   |  |  
		  |  Jedi Knight
 
 
 Joined: 25 Mar 2003Posts: 2538
 Location: Melbourne, Australia
 
 | 
			  
				| 
   
	| balaraju wrote: |  
	| sorry for the delay. Below is the snippet Earlier :
 MQLONG          A;
 MQLONG          B;
 After casting
 long            A;
 long            B;
 |  That's fine, provided the compiler treats 'long' as a 32 bit integer.
 AFAIK, all UNIX compilers treat 'long' as 64 bits when compiling a 64 bit app. This may break MQI code that where you are passing values using MQLONG (a strictly 32 bit quantity).
 Can you post the code where it is casting? It would be nice to check if this is safe.
 _________________
 Glenn
 |  |  
		  | Back to top |  |  
		  |  |  
		  |  |  |  
 
 
  
  	| 
		
		  | 
 
 | 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
 
 |  |  |  |