C99 compatibility

C99 compatibility

Hi,I am trying to port a project in Linux to Windows. As my code uses C99 standard I decided to go with Intel C++ compiler on windows. I installed the trial version of Intel compiler and it seems to work well with Visual Studio 2010.But I see that standard files like stdbool.h and inttypes.h are missing from the package. In design section of the C99 wikihttp://en.wikipedia.org/wiki/C99it is said that stdbool.h and inttypes.h are new header files introduced. I found Intel's implementation of stdbool.h here,http://www.ssl.berkeley.edu/~jimm/grizzly_docs/SSL/opt/intel/cc_81/include/stdbool.h!!!I wonder if this files missing issue has something to do with the trial version or is there something very obvious that I am missing here??Please help...

8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Best Reply

There's no difference between the evaluation package and the fully licensed one, beyond the terms of the license.
As it has been reported that Microsoft agreed to support in future those features of C99 which are in common with C++, there may be a wait-and-see attitude here.

Thanks for the response Tim.From where can I get these missing files like stdbool.h and inttypes.h? Any recommendations?

I notice that stdbool.h is required in the gfortran build, so ought to be present in mingw installations. In fact, I use it myself bridging the gap between gfortran and ifort support for f2003. Likewise, inttypes.h is a mandatory part of gcc builds, including mingw. So you might be able to adapt those headers from such compilers for Windows.
If you try your search engine with "windows inttypes.h" you will see how others have dealt with this, including inttypes.h and cstdint claimed to support VS environment.
You might also file a feature request on ICL on your premier.intel.com support account, perhaps asking if you could have an extension of the evaluation should any suggestions be offered by Intel compiler team.

Quoting TimP (Intel)I notice that stdbool.h is required in the gfortran build, so ought to be present in mingw installations...
Even in older versionsv3.4.2or v3.4.5 of MinGWC++ compiler two header files stdbool.handinttypes.hincluded.

However, I usean absolutelyportablesolutionregarding the 'bool' type:

...
#define true ( unsigned char )1
#define false( unsigned char )0
...
typedef unsigned char bool;
...

Quoting prateek.shettyThanks for the response Tim. From where can I get these missing files like stdbool.h and inttypes.h? Any recommendations?

Please confirm that headers fromMinGW v3.4.2 will work for you... I could uploadwithout any problems.

Thanks Sergev, I will try with headers from MinGW...

Quoting prateek.shetty...I will try with headers from MinGW...

Please take a look at attached zip-file.I didn't check for headers dependencies and it ispossible that you could have compilation errors.

Attachments: 

AttachmentSize
Download MinGWHeaders.zip3.51 KB

Leave a Comment

Please sign in to add a comment. Not a member? Join today