Microsoft MVP성태의 닷넷 이야기
VC++: 24. error C2039: 'pOleStr' : is not a member of '_STRRET' [링크 복사], [링크+제목 복사],
조회: 17999
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

이 오류 만날 때마다 잊어버려서, 아예 홈페이지에 올려 놓으려고 합니다. ^^

구체적인 오류는 다음과 같습니다.

d:\XXX.cpp(205) : error C2039: 'pOleStr' : is not a member of '_STRRET'
        c:\program files\microsoft visual studio 8\vc\platformsdk\include\shtypes.h(165) : see declaration of '_STRRET'
d:\XXX.cpp(212) : error C2039: 'uOffset' : is not a member of '_STRRET'
        c:\program files\microsoft visual studio 8\vc\platformsdk\include\shtypes.h(165) : see declaration of '_STRRET'
d:\XXX.cpp(220) : error C2039: 'cStr' : is not a member of '_STRRET'
        c:\program files\microsoft visual studio 8\vc\platformsdk\include\shtypes.h(165) : see declaration of '_STRRET'

실제로 헤더 파일에 가면 아래와 같이 정의가 되어 있습니다.

typedef struct _STRRET
    {
    UINT uType;
    /* [switch_is][switch_type] */ union 
        {
        /* [case()][string] */ LPWSTR pOleStr;
        /* [case()] */ UINT uOffset;
        /* [case()] */ char cStr[ 260 ];
        } 	DUMMYUNIONNAME;
    } 	STRRET;

앞/뒤로, 아무리 if defined 같은 전처리기를 찾아봐도 위의 정의를 빼먹을 만한 컴파일러 지시자는 보이지 않습니다.

결국 어렵게 찾아 헤매다 보면,

stdafx.h에 정의되어 있는 아래의 매크로 상수가 문제였음을 알게 됩니다.

#define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers
미련 없이 주석처리하시면, 컴파일러 에러는 없어집니다. ^^






[최초 등록일: ]
[최종 수정일: 3/20/2023]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... 136  137  138  139  140  141  142  143  144  [145]  146  147  148  149  150  ...
NoWriterDateCnt.TitleFile(s)
1426정성태3/29/201324003개발 환경 구성: 186. SCOM 2012 환경 구성 - 관리 대상 추가
1424정성태3/21/201325810개발 환경 구성: 185. System Center 2012 Operations Manager 설치
1423정성태3/18/201320860오류 유형: 170. The specified domain either does not exist or could not be contacted.
1422정성태3/14/201323032오류 유형: 169. Windows 8/2012에 .NET 3.5가 설치되지 않는 경우
1421정성태3/13/201340257.NET Framework: 364. WCF RIA 서비스 + Silverlight 사용 예제
1420정성태3/12/201325005오류 유형: 168. ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
1419정성태3/12/201321521Windows: 70. 관리 도구에서 "Windows Server Backup" 항목이 없는 경우
1418정성태2/28/201331423오류 유형: 167. Internet Explorer 10 설치 후 Flash 객체의 메서드/속성 접근 오류가 발생한다면?
1417정성태2/25/201327583.NET Framework: 363. ASP.NET AJAX PageMethods - ASPX.cs의 static 메서드를 AJAX로 호출파일 다운로드1
1416정성태2/22/201330191개발 환경 구성: 184. Xamarin 2.0 - Visual Studio에서 Android 앱을 폰으로 직접 배포하는 방법
1415정성태2/21/201337467개발 환경 구성: 183. Xamarin 2.0 - 윈도우 환경의 Visual Studio에서 C#으로 iOS/Android 응용 프로그램 개발 [4]파일 다운로드1
1414정성태2/21/201332646개발 환경 구성: 182. JMeter로 XML 웹 서비스 호출에 대한 부하 테스트 방법파일 다운로드2
1413정성태2/19/201331979VC++: 66. Chromium 컴파일하는 방법 - 두 번째 이야기 [3]
1412정성태2/6/201333851VC++: 65. Python 소스코드를 Visual C++로 빌드하는 방법 [3]
1411정성태1/31/201349172개발 환경 구성: 181. 무료 데이터베이스 서버 성능 비교(SQL Server Express, IBM DB2 Express, MySQL, Sybase, PostgreSQL, Oracle XE) [9]
1410정성태1/31/201331030.NET Framework: 362. C# - 닷넷 응용 프로그램에서 Sybase DB 사용 [1]파일 다운로드1
1409정성태1/30/201334910.NET Framework: 361. C# - 공유기 관리 웹 페이지 인증 [4]파일 다운로드1
1408정성태1/29/201329805.NET Framework: 360. C# - 닷넷 응용 프로그램에서 DB2 Express-C 데이터베이스 사용 (2) [1]파일 다운로드1
1407정성태1/29/201328204.NET Framework: 359. C# - 닷넷 응용 프로그램에서 DB2 Express-C 데이터베이스 사용 (1)
1406정성태1/22/201322555개발 환경 구성: 180. Windows Server 2012 RC 버전을 RTM으로 업그레이드하는 방법
1405정성태1/16/201344245.NET Framework: 358. C# - 닷넷 응용 프로그램에서 MySQL(MySqlConnector) 사용 [7]파일 다운로드1
1404정성태1/15/201329114개발 환경 구성: 179. Hyper-V VM 복사는 robocopy로. [2]
1403정성태1/14/201331964.NET Framework: 357. .NET 4.5의 2GB 힙 한계 극복
1402정성태1/14/201332475오류 유형: 166. SmtpClient.Send 오류 - net_io_connectionclosed
1401정성태1/11/201329780.NET Framework: 356. (공개키를 담은) 자바의 key 파일을 닷넷의 RSACryptoServiceProvider에서 사용하는 방법 [2]파일 다운로드1
1400정성태1/10/201328961Windows: 69. 작업표시줄의 터치 키보드(Touch Keyboard) 없애는 방법 [3]
... 136  137  138  139  140  141  142  143  144  [145]  146  147  148  149  150  ...