Shawn Driscoll's Tech Blog


Stuff That Happened in the Past

Monday, May 7, 2012

24 Hours Later, MinGW GCC 4.3.3 is Saving my Privates

Ok. Things got a lot worse after my last post. My poor Microsoft Visual C++ 6.0 is no longer supported by my copy of Pyton 2.5.4. The planets are no longer aligned for these two. Lots of fussing and fighting with Python's MSVC++ 7.1's code and my Python's re-compiled MSVC++ 6.0 code... And still no way to fool all of the software all of the time into letting me add C code extensions to Python (ie. getting Python to import any of my compiled C code).

I have to say that I'm not much of a Google person. I prefer Bing. It showed me all the problems people had back in the day relating to the problems I saw waiting for me around the corner. Not only was Python being developed in MSVC++ 7.1 (aka MS Visual C++ 2003), GNU C++ was having a meltdown. GNU C++ had too many cooks in the kitchen, altering each other's source code and posting them on the web as "official" releases. Particularly, the MinGW variety of the famous GCC console command.

I already new I was not going to buy another Microsoft C compiler just so I could toy around with Python (before two weeks ago, I didn't even know I would be programming in Python). MSVC++ 6.0 saved my skin a few times in college twelve years ago, but it was not up to this task.

So the trick was to find the eye in the hurricane. Sure enough, someone was calm enough back then to package an installer for GNU C++ that would allow for setup options for users wanting to create C extensions for Python.

Windows has a Common Files folder. But this installer was like having a Common Sense folder.

So long story short, I'm able to compile C/C++ code as extensions for Python 2.5.4 (ie. Python imports my C code now). The awesome MinGW GCC 4.3.3 can be found at www.develer.com/oss/GccWinBinaries.

No comments:

Post a Comment