我正在尝试在 MinGW 中构建(这在 VS2005 中构建良好)但在以下位置遇到此错误:
#ifndef int64
#define int64 __int64 /**< Win32 version of 64-bit integers */
#endif
// also in class.h
#ifndef FADDR
#define FADDR
typedef int64 (*FUNCTIONADDR)(void*,...); /** the entry point of a module function */
#endif
我得到的错误是:
error: expected declaration specifiers or '...' before '*' token
typedef int64 (*FUNCTIONADDR)(void*,...); /** the entry point of a module function */
^
关于如何处理这个问题有什么建议吗? 谢谢。
最佳答案
__int64
是 part来自 MSVC,在 GCC 中不存在。您可以改用 stdint.h
中的 int64_t
。简单检查:
#ifdef _MSC_VER
typedef __int64 int64;
#else
#include <stdint.h>
typedef int64_t int64;
#endif
关于c++ - '...' 标记之前的预期声明说明符或 '*',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25253266/