开发者

Windows 64 bit porting issue

开发者 https://www.devze.com 2023-01-24 14:44 出处:网络
We have few projects, which are compiling my makefile. These make file working fine on Windows 32 and Visual Studio 2005.

We have few projects, which are compiling my makefile. These make file working fine on Windows 32 and Visual Studio 2005. For Windows 64 porting, we are using Visual Studio 2008. In make file 开发者_StackOverflow社区we defined /d “_WIN64” to set the 64 bit includes and other thing. In one file we are including the windows.h header. But as its declaring the pre processor WIN32. So after that we are getting error for ODBC. I tested this as following First:

#ifdef WIN32
in sds;
#endif
include windows.h>

Here we are not getting error for in and sds.

Second:

include windows.h>

#ifdef WIN32
in sds;
#endif

Here we are getting error for in and sds. Which shows windows.h is declaring WIN32. The erro we are getting for function SQLBindCol as follows:

error C2664: 'SQLBindCol' : cannot convert parameter 6 from 'SQLINTEGER *' to 'SQLLEN *' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

Any idea to get rid from it?

makefile entry is as :

CPP_PROJ=/nologo /MT /W3 /GR /EHsc /O2 /I "..\..\include" /I"$(VC_ROOT)\include" /I"$(WINSDKDIR)" /D "_WIN64" /D "NDEBUG" /D_CRT_SECURE_NO_WARNINGS /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 


The Win32 #define(s) should exist as well as the Win64 one(s) when compiling x64 code.

Think of Win64 as a superset of Win32 in this context.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号