MSBUILD: __inline issue with VS2015 with WDK 10

When i tries migrate old Driver project to VS2015 with WDK10 then at the time of compilation found issues with overloaded “operator new and operator delete”
Declarations:
__inline void* __cdecl operator new(size_t size, ULONG tag)
__inline void __cdecl operator delete(void *pVoid)

error C2220: warning treated as error - no ‘object’ file generated
warning C4229: anachronism used: modifiers on data are ignored
error C2061: syntax error: identifier ‘new’

Note:

  1. Projects are compiling successfully with old WDK build environment.
  2. Note: If i disabled “Treat Warnings as Error: No (/WX-)” then project compiles successfully but at the time of linking getting error “unresolved new and delete”.

Thanks.

What?s the question? You were using an older compiler that was not as language compliant as the new one, the new one told you that you can?t decorate new or delete as inline, end of story. Just remove the inline keywords as they are not allowed and have no effect even when they are present.

Sent from my Windows 10 phone

From: xxxxx@gmail.commailto:xxxxx
Sent: Thursday, April 14, 2016 6:15 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] MSBUILD: inline issue with VS2015 with WDK 10

When i tries migrate old Driver project to VS2015 with WDK10 then at the time of compilation found issues with overloaded “operator new and operator delete”
Declarations:
inline void* __cdecl operator new(size_t size, ULONG tag)
__inline void __cdecl operator delete(void *pVoid)

>error C2220: warning treated as error - no ‘object’ file generated
>warning C4229: anachronism used: modifiers on data are ignored
>error C2061: syntax error: identifier ‘new’

Note:
1. Projects are compiling successfully with old WDK build environment.
2. Note: If i disabled “Treat Warnings as Error: No (/WX-)” then project compiles successfully but at the time of linking getting error “unresolved new and delete”.

Thanks.


NTDEV is sponsored by OSR

Visit the list online at: http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:></mailto:xxxxx></mailto:xxxxx>