gpt4 book ai didi

javascript - Box2D Emscripten : what is box2d. clean.h,如何成功生成呢?

转载 作者:搜寻专家 更新时间:2023-10-31 01:52:18 26 4
gpt4 key购买 nike

我可能遗漏了一些简单的东西,但我真的弄不明白。

这是来自 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

最佳答案

通过删除 -xc++ 之间的空格,我能够使用 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com