在嵌入式项目中使用talloc

在嵌入式项目中使用talloc,c,compiler-errors,embedded,C,Compiler Errors,Embedded,我希望能够在我正在进行的嵌入式项目中使用它,但无法确定如何将其纳入我的开发环境中。所讨论的环境是供应商提供的Windows IDE,它使用ARM GCC 4.4.1,我正在使用它来瞄准ARM7设备 我已经到了编译器抱怨类型冲突的阶段: In file included from .\talloc-2.0.8\talloc.c:33: .\talloc-2.0.8\lib\replace/replace.h:626: error: conflicting types for 'ptrdiff_t'

我希望能够在我正在进行的嵌入式项目中使用它,但无法确定如何将其纳入我的开发环境中。所讨论的环境是供应商提供的Windows IDE,它使用ARM GCC 4.4.1,我正在使用它来瞄准ARM7设备

我已经到了编译器抱怨类型冲突的阶段:

In file included from .\talloc-2.0.8\talloc.c:33:
.\talloc-2.0.8\lib\replace/replace.h:626: error: conflicting types for 'ptrdiff_t'
c:\program files (x86)\cypress\psoc creator\2.2\psoc creator\import\gnu_cs\arm\4.4.1\bin\../lib/gcc/arm-none-eabi/4.4.1/include/stddef.h:149: note: previous declaration of 'ptrdiff_t' was here
.\talloc-2.0.8\lib\replace/replace.h:848: error: conflicting types for 'useconds_t'
c:\program files (x86)\cypress\psoc creator\2.2\psoc creator\import\gnu_cs\arm\4.4.1\bin\../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/include/sys/types.h:253: note: previous declaration of 'useconds_t' was here
.\talloc-2.0.8\talloc.c:123: error: expected specifier-qualifier-list before 'uint8_t'
我注意到replace.h试图包含一个名为config.h的文件,该文件在talloc源代码树中不存在——我通过创建一个名为config.h的空白文件解决了这个问题。使用config.h通知talloc系统已经定义了哪些函数?这只是使用
#define
指令阻止replace.h尝试替换现有类型的问题吗


考虑到这是我第一次尝试使用我在项目中没有自己编写的代码,我对如何协调这些冲突感到有些困惑。

config.h
应该自动生成。对于tmalloc,它是由(基于python的构建系统)完成的


谢谢你。看来我需要做的第一件事就是去学习如何使用python。阅读了talloc源代码发行版中的一些python文件后,我担心在Windows下使用waf可能无法生成必要的
config.h
文件。一切似乎都是专门为linux设置的,这并不奇怪。是否有人在Windows下执行过此操作?我收到以下错误:
检查uname版本类型:未找到检查头stdio.h:no
。见
$ python ./buildtools/bin/waf configure
Checking for program gcc or cc           : /usr/lib/ccache/gcc 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for gcc                         : ok  
Checking for program git                 : /usr/bin/git 
Check for -MD                            : yes 
....
$ python ./buildtools/bin/waf build
.....