我无法确定为什么下面的代码给出了编译错误,就好像找不到typedef定义一样。事实上,如果我添加'typedef TCHAR my_tchar'这一行(它已经在win32def.h中)在app.h编译进行得很顺利。找不到typedef定义
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 '*'
你的C代码在哪里?标题中实际上是什么?你没有提供必要的信息。 – 2012-03-07 05:56:57
尝试在win32def.h中包含头文件TCHAR – Jay 2012-03-07 06:03:20
抱歉,它在那里。 – user891260 2012-03-07 06:17:48