This is a nice SDK integration error that I have face several times now and figured it is time to chronicle the solution... googling the issues does not net much that is helpful...
so I know this is a PCH issue, initially stdafx.h was this
// stdafx.h : include file for standard system include files,// or project specific include files that are used frequently, but// are changed infrequently//#pragma once#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.#define _WIN32_WINNT 0x0502 // Change this to the appropriate value to target other versions of Windows.#endif#include#include// TODO: reference additional headers your program requires here//#include#include#include
and then I added:
#include#if (MSC_VER <>#include#endifand the error goes away....
Compiler Error C2470 'function' : looks like a function definition, but there is no formal parameter list; skipping apparent body
ReplyDeletenow this can be as simple as a bad Macro definition, such as one that is controlling the definition of IMEXP, which is usually tied to __declspec etc...