找不到typedef定义

时间:2012-03-07 05:37:32

标签: c typedef

我无法理解为什么以下代码会出现编译错误,就像找不到typedef定义一样。事实上,如果我添加'typedef TCHAR my_tchar;'这一行(在app32中已经在win32def.h中)编译顺利。

win32def.h

#ifndef win32def_h
#define win32def_h

#include <tchar.h>

typedef TCHAR my_tchar;

#endif

app.h

#include "win32def.h"
int my_function(const my_tchar *filename, ....)
compilation error at line of my_function:

error C2143: syntax error : missing ')' before '*'

1 个答案:

答案 0 :(得分:0)

使用什么编译器? 我不确定,但尝试启用“将wchar_t视为内置类型”选项。

相关问题