我在ccs中新建了一个工程,工程中使用了Utils_memAlloc开辟内存, 请问应该加入哪些头文件?
hui zhang13:
我的一个工程就包含一个main函数:
#include "tistdtypes.h" #include "fvid2_dataTypes.h" #include "src/utils_common/include/utils_mem.h"int main(void) {unsigned char* data = Utils_memAlloc(UTILS_HEAPID_DDR_CACHED_SR, 10000, 128);Utils_memFree( UTILS_HEAPID_DDR_CACHED_SR, data, 10000); return 0; }但是一直不能编译通过。
Denny%20Yang99373:
回复 hui zhang13:
有没有编译错误信息?
如果是编译错误可能是没有正确include同文件
如果是连接错误,可能是没有正确加入库文件
hui zhang13:
回复 Denny%20Yang99373:
有编译错误信息,错误提示信息:
"D:/VISION_SDK_02_08_00_00/vision_sdk/src/utils_common/include/utils.h", line 248: error #20: identifier "FVID2_DataFormat" is undefined "D:/VISION_SDK_02_08_00_00/vision_sdk/src/utils_common/include/utils.h", line 253: error #20: identifier "FVID2_DataFormat" is undefined>> Compilation failure "D:/VISION_SDK_02_08_00_00/vision_sdk/src/utils_common/include/utils.h", line 286: warning #225-D: function declared implicitly "D:/VISION_SDK_02_08_00_00/vision_sdk/src/utils_common/include/utils_mem.h", line 165: error #20: identifier "FVID2_Format" is undefined "D:/VISION_SDK_02_08_00_00/vision_sdk/src/utils_common/include/utils_mem.h", line 166: error #20: identifier "FVID2_Frame" is undefined "D:/VISION_SDK_02_08_00_00/vision_sdk/src/utils_common/include/utils_mem.h", line 170: error #20: identifier "FVID2_Format" is undefined "D:/VISION_SDK_02_08_00_00/vision_sdk/src/utils_common/include/utils_mem.h", line 171: error #20: identifier "FVID2_Frame" is undefined "D:/VISION_SDK_02_08_00_00/vision_sdk/src/utils_common/include/utils_mem.h", line 175: error #20: identifier "FVID2_Format" is undefinedFVID2_DataFormat等几个结构的定义在fvid2_dataTypes.h中,如果我将vid2_dataTypes.h加入utils.h和utils_mem.h中,编译仍然会提示同样的未定义错误。
Tony Tang:
回复 hui zhang13:
Vision SDK是从哪得到的?目前这个软件是NDA的,你要从你的渠道来源寻求支持。我都没有这个软件。
hui zhang13:
回复 Tony Tang:
好的 多谢!