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 {
}
에러가 발생합니다. 이유는 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 {
}
'공개 포스팅' 카테고리의 다른 글
쿠팡 (0) | 2011.06.09 |
---|---|
#pragma message (">> compiling end point...") (0) | 2011.05.19 |
처음으로 여행을 시작하시는 분들 (0) | 2011.05.12 |
윈도우 임시 파일 정리 (0) | 2011.05.07 |
ogg 를 mp3 로 변환 - Free Mp3 Wma Converter 프리웨어 (0) | 2011.05.06 |