繁体   English   中英

找不到typedef定义

[英]typedef definition not found

我不知道为什么以下代码会给出编译错误,就像找不到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

应用程序

#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作为内置类型处理”选项。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM