________________________________

From: Mark Hammond [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 18, 2007 5:09 PM
To: MACKEITH Andrew; python-win32@python.org
Subject: RE: [python-win32] Compiling win32 extensions



        Oops - my mistake!  Please see pywintypes.h, where you will find
a block:

         

        // As of Python 2.6, Python switched to 'wchar_t' for unicode.
Some old

        // win32 structures that still use 'unsigned short' now fail
from C++ with

        // VS8 so we provide a couple of helpers.

        // XXX - but, when trying to use VC2003 with x64, the SDK x64
compiler

        // reports itself as 14.00.40310.41 - so this breaks under that
compiler

        // Its not clear how to resolve this, but while VS2003 is the
default

        // compiler, that is what must work.

        #if 0 // and _MSC_VER >= 1400

        ...

         

        Sadly, I can't think of anything to test that works in all
cases, so you will need to manually enable that block.  Any ideas
regarding what to test for would be appreciated...

         

        Cheers,

         

        Mark

         

I did as you suggested, but I can't see what difference this would make
to line 1266 of win32apimodule.cpp.

 

I changed line 1266 to

                //rc  =
::GetFileAttributesW(PyUnicode_AS_UNICODE(obPathName));
                rc =
::GetFileAttributesW(PyWinObject_FreeWCHAR(obPathName));


but the error is now:

 

win32apimodule.cpp
win32/src/win32apimodule.cpp(1267) : error C2665:
'PyWinObject_FreeWCHAR' : none of the 2 overloads could convert all the
argument types
 
p:\cae\python\upgrade\6-8\builds\win86_32\win32ext\pywin32\win32\src\PyW
inTypes.h(161): could be 'void PyWinObject_FreeWCHAR(WCHAR *)'
 
p:\cae\python\upgrade\6-8\builds\win86_32\win32ext\pywin32\win32\src\PyW
inTypes.h(175): or 'void PyWinObject_FreeWCHAR(unsigned short *)'
        while trying to match the argument list '(PyObject *)'


Andrew

        From: MACKEITH Andrew [mailto:[EMAIL PROTECTED] 
        Sent: Sunday, 18 November 2007 3:01 PM
        To: Mark Hammond; python-win32@python.org
        Subject: RE: [python-win32] Compiling win32 extensions

         

         

                 

________________________________

                From: Mark Hammond [mailto:[EMAIL PROTECTED] 
                Sent: Saturday, November 17, 2007 9:12 PM
                To: MACKEITH Andrew; python-win32@python.org
                Subject: RE: [python-win32] Compiling win32 extensions

                Although VS8 is not officially supported and no official
binaries are released built with that version, you should find the CVS
version of pywin32 builds cleanly with VS8, even if you target x64.

                 

                Cheers,

                 

                Mark 

                 

        I downloaded the CVS tree on Nov 9th, and I am building with
that. 

         

        How does LPCWSTR relate to Py_UNICODE? 

         

        win32/src/win32apimodule.cpp(1266) : error C2664:
'GetFileAttributesW' : cannot convert parameter 1 from 'Py_UNICODE *' to
'LPCWSTR'
         

        Andrew 

         

                 

                From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of MACKEITH Andrew
                Sent: Saturday, 10 November 2007 5:58 AM
                To: python-win32@python.org
                Subject: [python-win32] Compiling win32 extensions

                 

                I am compiling the win32 extensions on 32 bit windows
using Microsoft Visual Studio 8 (AKA .Net 2005)

                 

                I have had some problems with paths, but managed to
solve these by manually adding paths to the registry.

                 

                (I am puzzled that dsound.h appears in the SDK for ce,
but not the regular SDK.)

                 

                I am now stumped by these (related) compile errors.

                 

                win32apimodule.cpp
                win32/src/win32apimodule.cpp(1266) : error C2664:
'GetFileAttributesW' : cannot convert parameter 1 from 'Py_UNICODE *' to
'LPCWSTR'
                        Types pointed to are unrelated; conversion
requires reinterpret_cast, C-style cast or function-style cast
                win32/src/win32apimodule.cpp(1451) : error C2664:
'PyUnicodeUCS2_FromUnicode' : cannot convert parameter 1 from 'wchar_t
[260]' to 'const Py_UNICODE *'
                        Types pointed to are unrelated; conversion
requires reinterpret_cast, C-style cast or function-style cast
                win32/src/win32apimodule.cpp(1975) : error C2664: 'DWORD
(LPCWSTR,LPWSTR,DWORD)' : cannot convert parameter 2 from 'Py_UNICODE *'
to 'LPWSTR'
                        Types pointed to are unrelated; conversion
requires reinterpret_cast, C-style cast or function-style cast

                 

                Are these new errors in Visual Studio 8?

                 

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to