List Info

Thread: Building pywin32 with the free MS toolkit compiler (Was: Problem with installer for pywin32 with Pyt




Building pywin32 with the free MS toolkit compiler (Was: Problem with installer for pywin32 with Pyt
user name
2006-04-17 21:54:37
On 4/17/06, Paul Moore <p.f.mooregmail.com> wrote:
> On 4/16/06, Paul Moore <p.f.mooregmail.com> wrote:
> > I tried building one for myself, but I'm missing
some critical
> > dependencies (dsound.h?)
>
> I'm assuming this is from the DirectX SDK, which I'm
in the process of
> downloading now to try it out. Are there any other
downloads I should
> get in order to build pywin32? (I have the platform SDK
- the setup.py
> doesn't mention any others as still being needed, but
then again, it
> didn't mention the DirectX one either...)

Looks like atlbase.h is needed in win32netuse and
win32netuser. That's
annoying, as it's not freely available, as far as I know.

It's possible taht ATL isn't actually needed, though -
commenting the
includes out results in a successful compile. The link fails
with an
odd error, though -

   Creating library
build\temp.win32-2.5\Release\win32/src/win32net\win32net
.lib
 and object
build\temp.win32-2.5\Release\win32/src/win32net\win32net
.exp
win32netmodule.obj : error LNK2019: unresolved external
symbol
__imp__GetSecurityDescriptorLength4 referenced in function
"int
__cdecl PyObject_AsNET_STRUCT(struct _object *,struct
PyNET_STRUCT
*,unsigned char * *)"
(?PyObject_AsNET_STRUCTYAHPAU_objectPAUPyNET_STRUCTPAPAEZ)
win32netmodule.obj : error LNK2019: unresolved external
symbol
__imp__GetLengthSid4 referenced in function "int
__cdecl
PyObject_AsNET_STRUCT(struct _object *, struct PyNET_STRUCT
*,unsigned
char * *)" (?PyObject_AsNET_STRUCTYAHPAU_objectPAUPyNET_STRUCTPAPAEZ)
build\lib.win32-2.5\win32\win32net.pyd : fatal error
LNK1120: 2
unresolved externals

I'm not sure how this could be related to the ATL include -
it looks
more like a declaration missing an "extern C" -
but that seems
improbable.

If I comment out win32net from setup.py, I hit a problem in
win32wnet\PyNetresource.cpp, which uses ATL for Unicode
conversion
macros.

I took out axdebug, as it's described as "a
mess", so let's leave that
for now  But that
uses ATL, as well...

mapiutil also failed with ATL dependencies.

But then I hit win32ui, which I'd forgotten about
completely - that
uses MFC, doesn't it, so presumably there's no serious
hope of getting
it working without the full Visual C product.

At this point I gave up. I was impressed by how far things
got with
just the free stuff, but the lack of MFC and ATL is probably
a
complete showstopper.

Anyway, I'm posting this, not so much in the hope that
it's possible,
as to have it in the archives for future reference.

It was an interesting exercise, in any case 

Paul.
_______________________________________________
Python-win32 mailing list
Python-win32python.org

http://mail.python.org/mailman/listinfo/python-win32
Building pywin32 with the free MS toolkit compiler(Was: Problem with installer for pywin32 with Pyth
user name
2006-04-18 12:09:09
> On 4/17/06, Paul Moore <p.f.mooregmail.com> wrote:
> > On 4/16/06, Paul Moore <p.f.mooregmail.com> wrote:
> > > I tried building one for myself, but I'm
missing some critical
> > > dependencies (dsound.h?)
> >
> > I'm assuming this is from the DirectX SDK, which
I'm in the process of
> > downloading now to try it out. Are there any other
downloads I should
> > get in order to build pywin32? (I have the
platform SDK - the setup.py
> > doesn't mention any others as still being needed,
but then again, it
> > didn't mention the DirectX one either...)
>
> Looks like atlbase.h is needed in win32netuse and
win32netuser. That's
> annoying, as it's not freely available, as far as I
know.
>
> It's possible taht ATL isn't actually needed, though
- commenting the
> includes out results in a successful compile. The link
fails with an
> odd error, though -

Removing atlbase.h just meant that advapi32.lib needed to be
added to the
link command-line - presumably the ATL headers automatically
caused that to
happen.  I've just checked in a fix for that and removed
that header.

> If I comment out win32net from setup.py, I hit a
problem in
> win32wnet\PyNetresource.cpp, which uses ATL for
Unicode conversion
> macros.

These conversion macros are fairly easy (but not
search-replace easy) to
change, and I do it as I find it necessary.

> mapiutil also failed with ATL dependencies.

That seems to build simply by removing the #include.  I've
checked that in
too!

> But then I hit win32ui, which I'd forgotten about
completely - that
> uses MFC, doesn't it, so presumably there's no
serious hope of getting
> it working without the full Visual C product.

It does - although many real projects can live without
win32ui (and
therefore without Pythonwin).  Thus, this may still be a
perfectly good
solution for people who want to be able to build everything
they ship (or
just a debug build of what they actually use) - but not
necessarily be able
to build the entire pywin32 world.

> At this point I gave up. I was impressed by how far
things got with
> just the free stuff, but the lack of MFC and ATL is
probably a
> complete showstopper.

As above - it is probably a showstopper for anyone hoping to
recreate a
complete pywin32 build - but for many others it may be truly
useful.

> Anyway, I'm posting this, not so much in the hope that
it's possible,
> as to have it in the archives for future reference.
>
> It was an interesting exercise, in any case 

Thanks!  I welcome any other contributions (from anyone at
all) towards this
end!

Cheers,

Mark

_______________________________________________
Python-win32 mailing list
Python-win32python.org

http://mail.python.org/mailman/listinfo/python-win32
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )