找不到c-typedef定义



我不明白为什么下面的代码会出现编译错误,就好像找不到typedef定义一样。事实上,如果我添加行"typedef TCHAR my_TCHAR;"(它已经在win32def.h中)在app.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 '*'

使用什么编译器?我不确定,但试着打开选项"将wchar_t视为内置类型"。

最新更新