Display music notation

Microsoft DOES now have a free version of their C compiler available, but it is Visual C++ 7.1, not 6.0, so it won't help this specific situation.

The free version is called the "Visual C++ Toolkit". It includes the compiler (with optimizer disabled), the C runtime library, the C++ standard library, and the .NET framework. It does NOT include the GUI, nor the Platform SDK with the Win32 API, but that is also downloadable for free. There is some debate going on at comp.lang.python as to whether this is sufficient for compiling Python, and hence Python extensions.

If you're interested in this: Microsoft Learn: Build skills that open doors in your career

···

On Tue, 28 Sep 2004 19:22:56 -0400, Brian Victor <bhv1@psu.edu> wrote:

On Wed, Sep 29, 2004 at 12:01:52AM +0100, Malcolm Clift wrote:

error: Python was built with version 6 of Visual Studio, and extensions need to
be built with the same version of the compiler, but it isn't installed.
   
That's the key. Looks like you need to obtain the compiler for MSVC6.
I think that might be a free download from Microsoft now. But I'm not
on Windows, so I'm not sure I'll be much help past this point.

--
- Tim Roberts, timr@probo.com
  Providenza & Boekelheide, Inc.

Thanks Tim

Malcolm

<snip>

Microsoft DOES now have a free version of their C compiler available,
but it is Visual C++ 7.1, not 6.0, so it won't help this specific situation.

The free version is called the "Visual C++ Toolkit". It includes the
compiler (with optimizer disabled), the C runtime library, the C++
standard library, and the .NET framework. It does NOT include the GUI,
nor the Platform SDK with the Win32 API, but that is also downloadable
for free. There is some debate going on at comp.lang.python as to
whether this is sufficient for compiling Python, and hence Python
extensions.

Minor (but possibly important) point of fact: the compiler shipped
with the Visual C++ Toolkit does optimize (it's identical to the
compiler shipped with Visual Studio). The compiler shipped with the
.NET SDK is the non-optimizing one.

The main problem for using it for most people is that it only ships
with static libs for the MSVCRT, and the dynamic import libs aren't
redistributable and aren't part of the SDK - they're only available
with Visual Studio. It also takes a little bit of trickery to make it
produce dlls.

edit: apparently someone on the list noticed that the .NET SDK
provides import libs for the dynamic MSVCRT. That's very cool, even if
it does mean you need ~ 3 gigs of dependencies to compile Python &
extensions (crazy!). I know the toolkit can use libs, I was able to
compile against msvcrt7.1 using the libs included with visual studio.

···

On Wed, 29 Sep 2004 11:17:02 -0700, Tim Roberts <timr@probo.com> wrote:

If you're interested in this:
Microsoft Learn: Build skills that open doors in your career

--
- Tim Roberts, timr@probo.com
  Providenza & Boekelheide, Inc.

Chris Mellon wrote:
...

edit: apparently someone on the list noticed that the .NET SDK
provides import libs for the dynamic MSVCRT. That's very cool, even if
it does mean you need ~ 3 gigs of dependencies to compile Python &
extensions (crazy!). I know the toolkit can use libs, I was able to
compile against msvcrt7.1 using the libs included with visual studio.

See this page for my experiments from a few months ago:
    Building Python Extensions with the MS Toolkit Compiler
which gives instructions on setting up an MSToolkit environment for compiling distutils-based Python 2.4 extensions.

To get back on topic, I've not yet tried to compile wxPython with it, but it works for OpenGLContext, Numpy, mxTextTools-nr, and PyOpenGL, so it's at least minimally functional.

Have fun,
Mike

···

________________________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://www.vrplumber.com
  http://blog.vrplumber.com

Thanks Chris, Thanks Mike,

Malcolm

Hi Tim, Malcom, anybody else around,

Tim Roberts wrote:

error: Python was built with version 6 of Visual Studio, and extensions need to
be built with the same version of the compiler, but it isn't installed.

That's not quite true... it's not a big deal to compile python-extensions on Windows with gcc (mingw or cygwin).

Explained in detail in the python manual, Section 6.2.2

In short
- you need cygwin or mingw compiler
- build libpython23.a from python23.lib and put that in the $PYTHON\\libs folder
- append -cmingw32 to $python setup.py or for a permanent setting write
"""
[build]
compiler=mingw32
"""
into a file called setup.cfg in the same folder as setup.py.

Works like a charm, really!

That's the key. Looks like you need to obtain the compiler for MSVC6.
I think that might be a free download from Microsoft now. But I'm not
on Windows, so I'm not sure I'll be much help past this point.

Microsoft DOES now have a free version of their C compiler available, but it is Visual C++ 7.1, not 6.0, so it won't help this specific situation.

I don't mean to flame now, sorry, but this toolkit is _not_ free and distribution of anything built by it is extremely limited.

I read this first in an announcement on this give-away and taking a look into the "eula" now it holds true:

Microsoft Learn: Build skills that open doors in your career ->

See Sections 3.1 (ii): Only Windows Platforms.
(Well sure, not a big deal, mono and wine might be affected here but I'm not sure wether porting the software to another platform, redistributing with a different compiler is touched by this too).

Most important 3.2, that one deals with how you are and are not allowed to license your software distribution built with this toolkit:

"""An "Excluded License" [forbidden] is any license which requires as a condition of use, modification and/or distribution of software subject to the Excluded License, that such software or other software combined and/or distributed with such software
(x) be disclosed or distributed in source code form;
(y) be licensed for the purpose of making derivative works; or
(z) be redistributable at no charge."""

Sorry for this mind-boggling reader.
BTW: how many "software" do you count in the above sentence?

The direction here is quite clear...
(what strikes me a bit though is, that it's even forbidden to build closed-source freeware with this, ->(z))

Anyway it's always good to have some compilers lying around to tinker with so I wouldn't mind too much to get that one just for the fun of it. But I would never even start thinking about to do any serious work with this toy while there are other, much nicer ones around.

-Björn

···

On Tue, 28 Sep 2004 19:22:56 -0400, Brian Victor <bhv1@psu.edu> wrote:

On Wed, Sep 29, 2004 at 12:01:52AM +0100, Malcolm Clift wrote:

Hi Tim, Malcom, anybody else around,

That's not quite true... it's not a big deal to compile python-
extensions on Windows with gcc (mingw or cygwin).

Explained in detail in the python manual, Section 6.2.2

No offense, but unless cygwin has really moved up in the world it really doesn't work/integrate very well with Windows. Been there, done that. If I want to use gcc, I go to my Linux box. If I want object code on Windows, I fire up my copy of either the Microsoft or Borland compilers.

I don't mean to flame now, sorry, but this toolkit is _not_ free
and distribution of anything built by it is extremely limited.

I read this first in an announcement on this give-away and taking a
look into the "eula" now it holds true:

Microsoft Learn: Build skills that open doors in your career ->

See Sections 3.1 (ii): Only Windows Platforms.
(Well sure, not a big deal, mono and wine might be affected here
but I'm not sure wether porting the software to another platform,
redistributing with a different compiler is touched by this too).

Most important 3.2, that one deals with how you are and are not
allowed to license your software distribution built with this
toolkit:

"""An "Excluded License" [forbidden] is any license which requires
as a condition of use, modification and/or distribution of software
subject to the Excluded License, that such software or other
software combined and/or distributed with such software (x) be
disclosed or distributed in source code form;
(y) be licensed for the purpose of making derivative works; or (z)
be redistributable at no charge."""

Sorry for this mind-boggling reader.
BTW: how many "software" do you count in the above sentence?

The direction here is quite clear...
(what strikes me a bit though is, that it's even forbidden to build
closed-source freeware with this, ->(z))

Anyway it's always good to have some compilers lying around to
tinker with so I wouldn't mind too much to get that one just for
the fun of it. But I would never even start thinking about to do
any serious work with this toy while there are other, much nicer
ones around.

-Björn

I'm no lawyer but I think you are misreading the definitions in that document. "Redistributable Code" in those sections refers to Section 2.2. That section says to go read the "REDIST.TXT" file included in the install. REDIST.TXT contains only this text (which I've marked in Pythonic style):
"""There are no redistributable files (i.e., dll's/cab's, etc.) included with the Visual C++ Toolkit 2003. Object library files included with the Visual C++ Toolkit 2003 (e.g. the C Runtime Library static libraries designated with the suffix ".lib") will be automatically linked to your program when they are compiled by the Visual C++ compiler and linker. Inclusion of these static libraries as compiled into your program is acceptable; you may not, however, redistribute the static libraries standalone - on their own."""

As you can see, I think you might be getting your dander up over nothing. Basically using the statically linked libraries does not fall under the Section 2.2 and 3.x clauses. Therefore I CAN compile an app under Windows using the Visual C++ Toolkit and market it under the GNU or BSD licenses. What I can't do is go grab the MSVCR70.DLL (the Visual C++ 7.0 runtime DLL) and toss it into my distribution over on SourceForge. I either statically link the C library or I have to tell my users how to acquire the C runtime DLL.

I'm pro open-source and not too kind to Microsoft. However, I think in this instance, the bad boys from Redmond have offered up a free C++ compiler (along with static libs). Really, from a professional standpoint Microsoft doesn't charge that much for their tools over all. A MSDN Universal Subscription(darn near every Microsoft package for one developer) is only ~$2k per year (much less if you are site licensed). Relative to the cost of my time to my employer, the toolset is the least of our problems.

I think one could use the free compiler to build Python (barring any missing libs). Someone mentioned that the free version has no optimization available. My guess is that would make it roughly the same speed executables as gcc which has had very weak optimization ability (that may have changed in the last major release). Nothing against the gcc team; My understanding was they had bigger issues to deal with until recently. Neither compiler can touch the very nice Intel compiler optimizations (at least for Intel hardware).

On a different note, didn't Watcom or Borland have a free version of their commandline compilers?

Cheers,
Matthew Zaleski

···

On Fri, 08 Oct 2004 02:19:05 +0200, Björn Pfeiffer wrote:

Hi Bjorn and Matthew,

Thankyou both for your replies,

Malcolm

Matthew Zaleski wrote:

···

On Fri, 08 Oct 2004 02:19:05 +0200, Björn Pfeiffer wrote:

Hi Tim, Malcom, anybody else around,

That's not quite true... it's not a big deal to compile python-
extensions on Windows with gcc (mingw or cygwin).

Explained in detail in the python manual, Section 6.2.2

No offense, but unless cygwin has really moved up in the world it really doesn't work/integrate very well with Windows. Been there, done that. If I want to use gcc, I go to my Linux box. If I want object code on Windows, I fire up my copy of either the Microsoft or Borland compilers.

cygwin and mingw are different stories. cygwin is designed to give you POSIX on top of Windows. MinGW is a great gcc compiler for Windows, it works and integrates very well, and compiles Python extensions very nicely (I even compile the mod_python plugin for Apache with it)

David

I have no experience with MinGW. I was under the mistaken impression that it had been absorbed into the cygwin project.

On a different note, I did install Microsoft SFU 3.5 (Services for Unix) a while back; version 3.5 is free unlike previous versions. It's supposed to do the same thing as cygwin. Give you a POSIX interface. I haven't had time to play with it much but at first blush it seemed to integrate much better with Windows than cygwin. OTOH, cygwin has a much larger collection of utilities precompiled. I swear that gcc was supposed to work under SFU but I never got that far. I always end up at my Linux box when I want a GNU environment.

Ok, I just fired up my laptop (WinXP with SFU 3.5). 'which gcc' came back with /opt/gcc.3.3/bin/gcc and 'gcc -v' also reports 'gcc version 3.3'.

I don't know if SFU is yet another option for those pursuing Python compiles on WinXP.

Matthew Zaleski

···

On Fri, 08 Oct 2004 09:47:51 +0200, David Fraser wrote:

Matthew Zaleski wrote:

On Fri, 08 Oct 2004 02:19:05 +0200, Björn Pfeiffer wrote:

Hi Tim, Malcom, anybody else around,

That's not quite true... it's not a big deal to compile python-
extensions on Windows with gcc (mingw or cygwin).

Explained in detail in the python manual, Section 6.2.2

No offense, but unless cygwin has really moved up in the world it
really doesn't work/integrate very well with Windows. Been
there, done that. If I want to use gcc, I go to my Linux box.
If I want object code on Windows, I fire up my copy of either the
Microsoft or Borland compilers.

cygwin and mingw are different stories. cygwin is designed to give
you POSIX on top of Windows. MinGW is a great gcc compiler for
Windows, it works and integrates very well, and compiles Python
extensions very nicely (I even compile the mod_python plugin for
Apache with it)

David