作者热门文章
- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我可能遗漏了一些简单的东西,但我真的弄不明白。
这是来自 the makefile :
box2d.clean.h:
cpp -x c++ -DEM_NO_LIBCPP -IBox2D_v2.2.1 root.h > box2d.clean.h
我们来看看root.h :
// Prevent some inclusions
#define NDEBUG
#ifdef EM_NO_LIBCPP
#define _FEATURES_H
#define _GLIBCXX_CMATH
#define _GLIBCXX_CXX_CONFIG_H
#define _CPP_TYPE_TRAITS_H
#define _EXT_TYPE_TRAITS
#define _GLIBCXX_NUMERIC_LIMITS
#define __GNUC_PREREQ(x, y) 0
#define _STL_RELOPS_H
#define _STL_PAIR_H
#define _FUNCTEXCEPT_H
#define _EXT_NUMERIC_TRAITS
#define _STL_ITERATOR_BASE_TYPES_H
#define _STL_ITERATOR_H
#endif
#include <Box2D/Box2D.h>
好的。是的,我看到我们通过定义它们的包含守卫来防止包含多个 header 。像 <Features.h>
这样的标题.
我的问题:
阻止包含这些 header 的目的可能是什么?
应该用什么命令cpp
化名为?在我的机器上,我看到了这个输出:
cpp -x c++ -DEM_NO_LIBCPP -IBox2D_v2.2.1 root.h > box2d.clean.h
i686-apple-darwin11-llvm-gcc-4.2: c: No such file or directory
i686-apple-darwin11-llvm-gcc-4.2: c++: No such file or directory
i686-apple-darwin11-llvm-gcc-4.2: warning: '-x -x' after last input file has no effect
i686-apple-darwin11-llvm-gcc-4.2: no input files
为什么 gcc
正在寻找c
?
最佳答案
通过删除 -x
和 c++
之间的空格,我能够使用 cpp
命令解决问题。
cpp -xc++ -DEM_NO_LIBCPP -IBox2D_v2.2.1 root.h > box2d.clean.h
关于javascript - Box2D Emscripten : what is box2d. clean.h,如何成功生成呢?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12851351/
我是一名优秀的程序员,十分优秀!