[csw-maintainers] c99/stdbool.h with c++
Ben Walton
bwalton at opencsw.org
Fri Jun 22 01:44:08 CEST 2012
Hi All,
I'm trying to build a C++ library with Sun CC and it's pulling in a
header that subsequently includes stdbool.h. This fails with:
"/usr/include/stdbool.h", line 42: Error: #error "Use of<stdbool.h> is
valid only in a c99 compilation environment.".
The failure is because _STDC_C99 isn't declared.
I understand that c99 and c++ aren't compatible in some circumstances
(this likely being a good example) but I'd like to try build this
project with Sun CC so that I can test some patches that I submitted.
I've tried using -xc99, -xlang=c99 and forcing the definition of
_STDC_C99. I either get no better result or an explosing (_STDC_C99)
has other bad effects.
This project will build with g++.
Does anyone have thoughts on building a c++ app that requires c99
features using CC?
Thanks
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302
More information about the maintainers
mailing list