suifeng654456 2020-06-04 16:36 采纳率: 0%
浏览 1146

ccs中警告“Type #303-D typedef name has already been declared (with same type)……”,怎么解决?

我用的软件版本是CCS5.5,平台是C2000系列的28335,编译优化等级位-O3。
编译警告内容如下:
Description Resource Path Location Type
#303-D typedef name has already been declared (with same type) …… external location: C:\ti\bios_5_42_01_09\packages\ti\bios\include\tistdtypes.h C/C++ Problem

打开tistdtypes.h文件,发现内部也存在对类型的定义,如下

#ifndef _TI_STD_TYPES
#define _TI_STD_TYPES

/*
 * Aliases for standard C types
 */
typedef int                     Int;
typedef unsigned                Uns;
typedef char                    Char;

/* pointer to null-terminated character sequence */
typedef char                    *String;

typedef void                    *Ptr;           /* pointer to arbitrary type */

typedef unsigned short          Bool;           /* boolean */



#endif  /* _TI_STD_TYPES */

而在工程的另一个头文件DSP2833x_Device.h中也对相关类型进行了定义,如下

#ifndef DSP28xx_DATA_TYPES
#define DSP28xx_DATA_TYPES
typedef unsigned char               uint8;
typedef volatile unsigned char      vuint8;
typedef int                         Int16;
typedef long                        Int32;
typedef long long                   Int64;
typedef unsigned int                uint16;
typedef volatile int                vint16;         /**< The volatile 16-bit signed data type. */
typedef volatile unsigned short     vuint16;  /**< The volatile 16-bit unsigned data type. */
typedef unsigned long               uint32;
typedef float                       Float32;
typedef long double                 Float64;
typedef unsigned long long          uint64;

/**
 * The SOCKET data type.
 */
typedef uint16 SOCKET;

#endif

因为实际工程中用的类型都是DSP2833x_Device.h中定义的类型,但工程中使用了DSP/BIOS,所以也包含了tistdtypes.h,我个人猜测应该是这两个文件中的类型定义存在冲突,但不知道怎么解决。

  • 写回答

2条回答 默认 最新

  • zqbnqsdsmd 2020-06-05 14:51
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 急matlab编程仿真二阶震荡系统
  • ¥20 TEC-9的数据通路实验
  • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
  • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
  • ¥15 python爬取bilibili校园招聘网站
  • ¥30 求解达问题(有红包)
  • ¥15 请解包一个pak文件