Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 819 Bytes

compiler-error-c2505.md

File metadata and controls

31 lines (24 loc) · 819 Bytes
descriptiontitlems.datef1_keywordshelpviewer_keywordsms.assetid
Learn more about: Compiler Error C2505
Compiler Error C2505
11/04/2016
C2505
C2505
b19f5c53-399d-425e-90db-fe3ca9b40858

Compiler Error C2505

'symbol' : '__declspec(modifer)' can only be applied to declarations or definitions of global objects or static data members

A __declspec modifier that is designed to only be used at global scope was used in a function.

For more information, see appdomain and process.

The following sample generates C2505:

// C2505.cpp// compile with: /clr// OK__declspec(process) int ii; __declspec(appdomain) int jj; intmain() { __declspec(process) int i; // C2505__declspec(appdomain) int j; // C2505 }
close