Programming/Database
windows에서 oracle access 프로그래밍 시 컴파일 에러
cancelmind
2009. 11. 10. 09:24
1>d:\program files\microsoft sdks\windows\v6.1\include\rpcndr.h(156) : error C2632: 'char' 다음에 'int'이(가) 올 수 없습니다.
1>d:\program files\microsoft sdks\windows\v6.1\include\rpcndr.h(156) : warning C4091: 'typedef ' : 변수를 선언하지 않으면 'unsigned char' 왼쪽은 무시됩니다.
1>D:\Program Files\Microsoft SDKs\Windows\v6.1\include\wtypes.h(1121) : error C2371: 'BOOLEAN' : 재정의. 기본 형식이 다릅니다.
1> D:\Program Files\Microsoft SDKs\Windows\v6.1\include\winnt.h(892) : 'BOOLEAN' 선언을 참조하십시오.
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\RpcNdr.h(147) : error C2632: 'char' followed by 'int' is illegal
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\RpcNdr.h(147) : warning C4091: 'typedef ' : ignored on left of 'unsigned char' when no variable is declared
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WTypes.h(1073) : error C2371: 'BOOLEAN' : redefinition; different basic types
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinNT.h(764) : see declaration of 'BOOLEAN'
oratypes.h 와 wtypes.h 의 boolean 선언이 틀려서 발생하는 에러다.
해결방법은 다음과 같다
1>d:\program files\microsoft sdks\windows\v6.1\include\rpcndr.h(156) : warning C4091: 'typedef ' : 변수를 선언하지 않으면 'unsigned char' 왼쪽은 무시됩니다.
1>D:\Program Files\Microsoft SDKs\Windows\v6.1\include\wtypes.h(1121) : error C2371: 'BOOLEAN' : 재정의. 기본 형식이 다릅니다.
1> D:\Program Files\Microsoft SDKs\Windows\v6.1\include\winnt.h(892) : 'BOOLEAN' 선언을 참조하십시오.
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\RpcNdr.h(147) : error C2632: 'char' followed by 'int' is illegal
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\RpcNdr.h(147) : warning C4091: 'typedef ' : ignored on left of 'unsigned char' when no variable is declared
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WTypes.h(1073) : error C2371: 'BOOLEAN' : redefinition; different basic types
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinNT.h(764) : see declaration of 'BOOLEAN'
oratypes.h 와 wtypes.h 의 boolean 선언이 틀려서 발생하는 에러다.
해결방법은 다음과 같다
1. The problem can be reproduced even by simply having these two heaeders in this order:
#include "OracleErrorHandler.h"
#include "CoralBase/MessageStream.h"
Inverting the order in this case proceeds with no error.
2. Note that a file including only the following header fails with our default compilation options!
#include <RpcNdr.h>
Including this file must be done via
#include <WTypes.h>
3. The problem can also be simply reproduced by
#include "oratypes.h"
#include <WTypes.h>
Inverting the order fixes it:
#include <WTypes.h>
#include "oratypes.h"
WTypes.h 를 먼저 include 하라는 말..
unix에서는 에러가 발생하지 않아서.. 난 그냥 oratypes.h 의 상단에 다음 코드를 추가 했다.
#ifdef _WINDOWS
#include <WTypes.h>
#endif
해결!