开发者

What's the equivalent of -xc99=all for Solaris Studio 12.2 C++ compiler?

I'm trying to build a program on Solaris 10 that includes stdbool.h.

For the C compiler I've added -xc99=all, and I'm trying to use -xlang=c99 for the C++ compiler, but still it gives me:

"/usr/include/stdbool.h", line 42: Error, usererror: #error "Use of is valid only in a c99 compilation environment.".

The full command line looks like:

CC -xlang=c99 -DHAVE开发者_运维问答_CONFIG_H -I. -xldscope=hidden -D_REENTRANT -mt -compat=5 \
-library=stlport4 -template=no%extdef -g -DDEBUG -xwe -xport64 -errtags=yes \
-erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint \
-errwarn=%all -erroff=truncwarn1,signextwarn,notused,inllargeuse,wunreachable \
-c backfill.cc  -KPIC -DPIC -o .libs/ep_la-backfill.o


It makes not much sense to compile C++ code with C99 options. In any case for C++ you definitively shouldn't use stdbool.h, bool is a keyword in C++.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜