Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

C99 compatibility

prateek_shetty
Beginner
1,174 Views
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...
0 Kudos
1 Solution
TimP
Honored Contributor III
1,174 Views
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.

View solution in original post

0 Kudos
7 Replies
TimP
Honored Contributor III
1,175 Views
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.
0 Kudos
prateek_shetty
Beginner
1,174 Views
Thanks for the response Tim.
From where can I get these missing files like stdbool.h and inttypes.h? Any recommendations?
0 Kudos
TimP
Honored Contributor III
1,174 Views
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.
0 Kudos
SergeyKostrov
Valued Contributor II
1,174 Views
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;
...
0 Kudos
SergeyKostrov
Valued Contributor II
1,174 Views
Thanks 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.

0 Kudos
prateek_shetty
Beginner
1,174 Views
Thanks Sergev, I will try with headers from MinGW...
0 Kudos
SergeyKostrov
Valued Contributor II
1,174 Views
...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.

0 Kudos
Reply