Re: [matplotlib-devel] build error in ttutil.cpp on win32
Michael Droettboom wrote: Hmmm... Well, I think we've reached the limit of my MSVC knowledge (which doesn't go very far.) I presume that for your local copy, you can just hard code it to : #ifdef 1 || WIN32 || _MSC_VER Actually, I just tried that, and it didn't work. Again, I don't really know anything about preprocessing in C, but it seems you can't put more than one MACRO in an #ifdef statement. Instead, it looks like you need to do: #if defined(WIN32) || defined(_MSC_VER) This *does* work for me. So it seems WIN32 isn't defined on my MSVC7.1, but _MSC_VER is (I've discovered that _WIN32 is defined as well). Anyways, I'm not sure if this is the ideal way to have it, but I've attached a patch against the latest rev. Cheers, Martin and at least get it working for yourself. But I think someone with more MSVC experience on this list may have to look into this and have more to offer. Cheers, Mike Martin Spacek wrote: Sorry for the delay. I gave that a try, but it didn't help. Seems that _MSC_VER is undefined as well... Martin Michael Droettboom wrote: Martin Spacek wrote: It's been a few months since I've updated and compiled from svn. I got this error today from rev 3926 (in winxp using msvc71): python setup.py build_ext --inplace --force BUILDING MATPLOTLIB matplotlib: 0.90.1 python: 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] platform: win32 Windows version: (5, 1, 2600, 2, 'Service Pack 2') REQUIRED DEPENDENCIES numpy: 1.0.4.dev4155 freetype2: found, but unknown version (no pkg-config) OPTIONAL DEPENDENCIES Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to "import gtk" in your build/install environment Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 wxPython: 2.8.4.0 * WxAgg extension not required for wxPython = 2.8 Qt: no Qt4: no Cairo: no libpng: found, but unknown version (no pkg-config) [Edit setup.cfg to suppress the above messages] running build_ext No module named msvccompiler in numpy.distutils; trying from distutils building 'matplotlib.ft2font' extension C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - Iwin32_static\include\freetype2 -I.\freetype2 -IC:\bin\Python25\include -IC:\bin\Python25\PC /Tpsrc/ft2font.cpp /Fobuild \temp.win32-2.5\Release\src/ft2font.obj Found executable C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - Iwin32_static\include\freetype2 -I.\freetype2 -IC:\bin\Python25\include -IC:\bin\Python25\PC /Tpsrc/mplutils.cpp /Fobuil d\temp.win32-2.5\Release\src/mplutils.obj C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - Iwin32_static\include\freetype2 -I.\freetype2 -IC:\bin\Python25\include -IC:\bin\Python25\PC /TpCXX\cxxsupport.cxx /Fobu ild\temp.win32-2.5\Release\CXX\cxxsupport.obj C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - Iwin32_static\include\freetype2 -I.\freetype2 -IC:\bin\Python25\include -IC:\bin\Python25\PC /TpCXX\cxx_extensions.cxx / Fobuild\temp.win32-2.5\Release\CXX\cxx_extensions.obj C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - Iwin32_static\include\freetype2 -I.\freetype2 -IC:\bin\Python25\include -IC:\bin\Python25\PC /TpCXX\IndirectPythonInterf ace.cxx /Fobuild\temp.win32-2.5\Release\CXX\IndirectPythonInterface.obj C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - Iwin32_static\include\freetype2 -I.\freetype2 -IC:\bin\Python25\include -IC:\bin\Python25\PC /TcCXX\cxxextensions.c /Fob uild\temp.win32-2.5\Release\CXX\cxxextensions.obj C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:win32_static\lib /LIBPAT H:C:\bin\Python25\libs /LIBPATH:C:\bin\Python25\PCBuild freetype.lib z.lib /EXPORT:initft2font build\temp.win32-2.5\Rele ase\src/ft2font.obj build\temp.win32-2.5\Release\src/mplutils.obj build\temp.win32-2.5\Release\CXX\cxxsupport.obj build\ temp.win32-2.5\Release\CXX\cxx_extensions.obj build\temp.win32-2.5\Release\CXX\IndirectPythonInterface.obj build\temp.wi n32-2.5\Release\CXX\cxxextensions.obj /OUT:lib\matplotlib\ft2font.pyd /IMPLIB:build\temp.win32-2.5\Release\src\ft2font.l i
Re: [matplotlib-devel] build error in ttutil.cpp on win32
Thanks. Sorry about the syntax errors -- I don't use the preprocessor much either. I think this patch seems reasonable (or at least reasonably harmless), so I'll go ahead and commit it. Cheers, Mike Martin Spacek wrote: > Michael Droettboom wrote: >> Hmmm... Well, I think we've reached the limit of my MSVC knowledge >> (which doesn't go very far.) I presume that for your local copy, you >> can just hard code it to : >> >> #ifdef 1 || WIN32 || _MSC_VER > > Actually, I just tried that, and it didn't work. Again, I don't really > know anything about preprocessing in C, but it seems you can't put more > than one MACRO in an #ifdef statement. Instead, it looks like you need > to do: > > #if defined(WIN32) || defined(_MSC_VER) > > This *does* work for me. So it seems WIN32 isn't defined on my MSVC7.1, > but _MSC_VER is (I've discovered that _WIN32 is defined as well). > Anyways, I'm not sure if this is the ideal way to have it, but I've > attached a patch against the latest rev. > > Cheers, > > Martin > > >> >> and at least get it working for yourself. But I think someone with >> more MSVC experience on this list may have to look into this and have >> more to offer. >> >> Cheers, >> Mike >> >> Martin Spacek wrote: >>> Sorry for the delay. I gave that a try, but it didn't help. Seems that >>> _MSC_VER is undefined as well... >>> >>> Martin >>> >>> Michael Droettboom wrote: Martin Spacek wrote: > It's been a few months since I've updated and compiled from svn. I got > this error today from rev 3926 (in winxp using msvc71): > >> python setup.py build_ext --inplace --force > > > > BUILDING MATPLOTLIB > matplotlib: 0.90.1 > python: 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) > [MSC > v.1310 32 bit (Intel)] >platform: win32 > Windows version: (5, 1, 2600, 2, 'Service Pack 2') > > REQUIRED DEPENDENCIES > numpy: 1.0.4.dev4155 > freetype2: found, but unknown version (no pkg-config) > > OPTIONAL DEPENDENCIES >Gtk+: no > * Building for Gtk+ requires pygtk; you > must be > able > * to "import gtk" in your build/install > environment > Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 >wxPython: 2.8.4.0 > * WxAgg extension not required for wxPython >> = 2.8 > Qt: no > Qt4: no > Cairo: no > libpng: found, but unknown version (no pkg-config) > > [Edit setup.cfg to suppress the above messages] > > > > running build_ext > No module named msvccompiler in numpy.distutils; trying from distutils > building 'matplotlib.ft2font' extension > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > Iwin32_static\include\freetype2 -I.\freetype2 > -IC:\bin\Python25\include > -IC:\bin\Python25\PC /Tpsrc/ft2font.cpp /Fobuild > \temp.win32-2.5\Release\src/ft2font.obj > Found executable C:\bin\Microsoft Visual Studio .NET > 2003\Vc7\bin\cl.exe > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > Iwin32_static\include\freetype2 -I.\freetype2 > -IC:\bin\Python25\include > -IC:\bin\Python25\PC /Tpsrc/mplutils.cpp /Fobuil > d\temp.win32-2.5\Release\src/mplutils.obj > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > Iwin32_static\include\freetype2 -I.\freetype2 > -IC:\bin\Python25\include > -IC:\bin\Python25\PC /TpCXX\cxxsupport.cxx /Fobu > ild\temp.win32-2.5\Release\CXX\cxxsupport.obj > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > Iwin32_static\include\freetype2 -I.\freetype2 > -IC:\bin\Python25\include > -IC:\bin\Python25\PC /TpCXX\cxx_extensions.cxx / > Fobuild\temp.win32-2.5\Release\CXX\cxx_extensions.obj > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > Iwin32_static\include\freetype2 -I.\freetype2 > -IC:\bin\Python25\include > -IC:\bin\Python25\PC /TpCXX\IndirectPythonInterf > ace.cxx > /Fobuild\temp.win32-2.5\Release\CXX\IndirectPythonInterface.obj > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - >
Re: [matplotlib-devel] build error in ttutil.cpp on win32
WIN32 worked for the last matplotlib release build I did, but I agree this patch is harmless. Thanks for looking into it this much. - Charlie On 10/16/07, Michael Droettboom <[EMAIL PROTECTED]> wrote: > Thanks. Sorry about the syntax errors -- I don't use the preprocessor > much either. > > I think this patch seems reasonable (or at least reasonably harmless), > so I'll go ahead and commit it. > > Cheers, > Mike > > Martin Spacek wrote: > > Michael Droettboom wrote: > >> Hmmm... Well, I think we've reached the limit of my MSVC knowledge > >> (which doesn't go very far.) I presume that for your local copy, you > >> can just hard code it to : > >> > >> #ifdef 1 || WIN32 || _MSC_VER > > > > Actually, I just tried that, and it didn't work. Again, I don't really > > know anything about preprocessing in C, but it seems you can't put more > > than one MACRO in an #ifdef statement. Instead, it looks like you need > > to do: > > > > #if defined(WIN32) || defined(_MSC_VER) > > > > This *does* work for me. So it seems WIN32 isn't defined on my MSVC7.1, > > but _MSC_VER is (I've discovered that _WIN32 is defined as well). > > Anyways, I'm not sure if this is the ideal way to have it, but I've > > attached a patch against the latest rev. > > > > Cheers, > > > > Martin > > > > > >> > >> and at least get it working for yourself. But I think someone with > >> more MSVC experience on this list may have to look into this and have > >> more to offer. > >> > >> Cheers, > >> Mike > >> > >> Martin Spacek wrote: > >>> Sorry for the delay. I gave that a try, but it didn't help. Seems that > >>> _MSC_VER is undefined as well... > >>> > >>> Martin > >>> > >>> Michael Droettboom wrote: > Martin Spacek wrote: > > It's been a few months since I've updated and compiled from svn. I got > > this error today from rev 3926 (in winxp using msvc71): > > > >> python setup.py build_ext --inplace --force > > > > > > BUILDING MATPLOTLIB > > matplotlib: 0.90.1 > > python: 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) > > [MSC > > v.1310 32 bit (Intel)] > >platform: win32 > > Windows version: (5, 1, 2600, 2, 'Service Pack 2') > > > > REQUIRED DEPENDENCIES > > numpy: 1.0.4.dev4155 > > freetype2: found, but unknown version (no pkg-config) > > > > OPTIONAL DEPENDENCIES > >Gtk+: no > > * Building for Gtk+ requires pygtk; you > > must be > > able > > * to "import gtk" in your build/install > > environment > > Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 > >wxPython: 2.8.4.0 > > * WxAgg extension not required for wxPython > >> = 2.8 > > Qt: no > > Qt4: no > > Cairo: no > > libpng: found, but unknown version (no pkg-config) > > > > [Edit setup.cfg to suppress the above messages] > > > > > > running build_ext > > No module named msvccompiler in numpy.distutils; trying from distutils > > building 'matplotlib.ft2font' extension > > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > > Iwin32_static\include\freetype2 -I.\freetype2 > > -IC:\bin\Python25\include > > -IC:\bin\Python25\PC /Tpsrc/ft2font.cpp /Fobuild > > \temp.win32-2.5\Release\src/ft2font.obj > > Found executable C:\bin\Microsoft Visual Studio .NET > > 2003\Vc7\bin\cl.exe > > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > > Iwin32_static\include\freetype2 -I.\freetype2 > > -IC:\bin\Python25\include > > -IC:\bin\Python25\PC /Tpsrc/mplutils.cpp /Fobuil > > d\temp.win32-2.5\Release\src/mplutils.obj > > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > > Iwin32_static\include\freetype2 -I.\freetype2 > > -IC:\bin\Python25\include > > -IC:\bin\Python25\PC /TpCXX\cxxsupport.cxx /Fobu > > ild\temp.win32-2.5\Release\CXX\cxxsupport.obj > > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > > /MD /W3 /GX /DNDEBUG -Iwin32_static\include -I. - > > Iwin32_static\include\freetype2 -I.\freetype2 > > -IC:\bin\Python25\include > > -IC:\bin\Python25\PC /TpCXX\cxx_extensions.cxx / > > Fobuild\temp.win32-2.5\Release\CXX\cxx_extensions.obj > > C:\bin\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > > /MD /W3 /GX /DN