Expected declaration specifiers or "..." before the "*" marker

I'm trying to build MinGW (this builds fine in VS2005), but before this error:

#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

      

and I get the following message:

 error: expected declaration specifiers or '...' before '*' token
 typedef int64 (*FUNCTIONADDR)(void*,...); /** the entry point of a module function */
                ^

      

Any suggestions on how to handle this? Thank.

+3


source to share


1 answer


__int64

part of MSVC and does not exist in GCC. You can use int64_t

from instead stdint.h

. Simple check:



#ifdef _MSC_VER
typedef __int64 int64;
#else
#include <stdint.h>
typedef int64_t int64;
#endif

      

+6


source







All Articles