哪里是stdbool.h? [英] Where is stdbool.h?

查看:399
本文介绍了哪里是stdbool.h?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想找到我的系统上的 _Bool 定义,所以它缺少系统的,我可以实现它。我已经看到了它在这里和其他网站不同的定义,但要检查系统上的权威定义。

I want to find the _Bool definition on my system, so for systems where it's missing I can implement it. I've seen various definitions for it here and on other sites, but wanted to check on the system for the definitive definition.

小问题,因为我找不到在哪里_Bool定义,甚至stdbool.h

Slight problem, in that I can't find where _Bool is defined or even stdbool.h

mussys@debmus:~$ find /usr/include/* -name stdbool.h
/usr/include/c++/4.3/tr1/stdbool.h

的grep _Bool / usr / include目录/ * / usr / include目录/ * / * 不要么找到它。

And grep for _Bool on /usr/include/* and /usr/include/*/* does not find it either.

那么,是什么呢?

推荐答案

_Bool 是一个内置的类型,所以不要指望找到它的定义头文件,甚至是系统头文件。

_Bool is a built-in type, so don't expect to find a definition for it in a header file, even a system header file.

话虽如此,从您正在搜索的路径猜测你的系统,你有没有在看 / usr / lib目录/ GCC / * / * /包含

Having said that, guessing your system from the paths that you are searching, have you looked in /usr/lib/gcc/*/*/include ?

我的真正的 stdbool.h 住在那里。正如预期的那样它的#define 取值布尔 _Bool 。由于 _Bool 是一种原产于编译器有一个在头文件中没有它的定义。

My "real" stdbool.h lives there. As expected it #defines bool to be _Bool. As _Bool is a type native to the compiler there's no definition for it in the header file.

这篇关于哪里是stdbool.h?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆