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 » IBM MQ API Support » Problems compiling C code

Post new topic  Reply to topic
 Problems compiling C code « View previous topic :: View next topic » 
Author Message
BBM
PostPosted: Fri Jun 29, 2007 7:33 am    Post subject: Problems compiling C code Reply with quote

Master

Joined: 10 Nov 2005
Posts: 217
Location: London, UK

Does anyone know why when I try and compile some C code on the bloodshed compiler under windows using the MQ 6.0 headers I get the following message:

2287 C:\Dev-Cpp\include\cmqc.h syntax error before "MQINT64"
2287 C:\Dev-Cpp\include\cmqc.h [Warning] data definition has no type or storage class

I'm a bit of dev novice so if this obvious apologies in advance...

Thanks

BBM
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jun 29, 2007 7:36 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Unsupported compiler?

Mixing 32 & 64 bit compilation options?

Mixing 32 & 64 bit header files?

One or more of the above in combination?

Please post platform & option details
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
BBM
PostPosted: Fri Jun 29, 2007 7:46 am    Post subject: Reply with quote

Master

Joined: 10 Nov 2005
Posts: 217
Location: London, UK

Hi,

I think unsupported compiler might be the case - I could compile simple code in 5.3 OK maybe things have changed for 6.0.

Platform is Windows XP - no options specified. Compiler is Bloodshed shareware compiler.

Looks like the compiler is objecting to the following line (amongst others)from cmqc.h :

typedef _int64 MQINT64


I'll try with Visual C++
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jun 29, 2007 10:17 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

BBM wrote:

Looks like the compiler is objecting to the following line (amongst others)from cmqc.h :

typedef _int64 MQINT64
Looks like this is a case of mixing 64 bit and 32 bit libraries...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
markt
PostPosted: Fri Jun 29, 2007 10:42 am    Post subject: Reply with quote

Knight

Joined: 14 May 2002
Posts: 508

Quote:
Looks like this is a case of mixing 64 bit and 32 bit libraries...


Nothing to do with libraries. Looks like a compiler that does not have an inbuilt 64-bit datatype. Which is needed for some applications EVEN IF it's a 32-bit program (eg some of the PCF attributes are 64-bit integers).
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Tue Jul 03, 2007 10:07 am    Post subject: Re: Problems compiling C code Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

BBM wrote:
2287 C:\Dev-Cpp\include\cmqc.h syntax error before "MQINT64"
2287 C:\Dev-Cpp\include\cmqc.h [Warning] data definition has no type or storage class

Hi,

I'm pretty sure I've posted this here before. Add the following to the top of your code before your MQ includes.

Code:
#ifndef _int64
#define _int64 long long
#endif


Lets see:
- WinXP is a 32-bit OS
- WMQ for Windows is 32-bit
- Compiler on 32-bit OS is generating defines for 32-bit applications

I'm just surprised that IBM made an assumption that '_int64' would be present on a 32-bit OS for a 32-bit compiler. It would have been so easy to put the code above at the top of cmqc.h header file.

Note: Users should not put the code above in the cmqc.h header file as the next time you apply a CSD or RefreshPack, the changes will be lost.


Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
tleichen
PostPosted: Fri Jul 06, 2007 7:19 am    Post subject: Re: Problems compiling C code Reply with quote

Yatiri

Joined: 11 Apr 2005
Posts: 663
Location: Center of the USA

RogerLacroix wrote:
...
I'm pretty sure I've posted this here before. Add the following to the top of your code before your MQ includes.

Code:
#ifndef _int64
#define _int64 long long
#endif


Lets see:
- WinXP is a 32-bit OS
- WMQ for Windows is 32-bit
- Compiler on 32-bit OS is generating defines for 32-bit applications

I'm just surprised that IBM made an assumption that '_int64' would be present on a 32-bit OS for a 32-bit compiler. It would have been so easy to put the code above at the top of cmqc.h header file...
IBM doesn't want to make things too seemless on non-IBM systems. After all, they do sell hardware too, you know!
_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Problems compiling C code
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.