2005 버전에서 사용하던 프로젝트인데 2010으로 컨버팅후 빌드를 하려면 아래와 같은
에러가 발생합니다. 이유는 2010 에서 namespace 안에서 #include 를 하면 문제가
생기니 #include 는 namespace 외부에서 선언 해야 합니다.

1>e:\program files (x86)\microsoft visual studio 10.0\vc\include\codeanalysis\sourceannotations.h(244): error C3083: 'vc_attributes': the symbol to the left of a '::' must be a type
1>e:\program files (x86)\microsoft visual studio 10.0\vc\include\codeanalysis\sourceannotations.h(244): error C2039: 'YesNoMaybe' : is not a member of '`global namespace''
1>e:\program files (x86)\microsoft visual studio 10.0\vc\include\codeanalysis\sourceannotations.h(244): error C2146: syntax error : missing ';' before identifier 'SA_YesNoMaybe'

에러 발생 시키는 코드 :

namespace Win32 {
#include <stddef.h>
}


올바른 코드 :

#include <stddef.h>
namespace Win32 {
}


Posted by great-artist
,