Shawn Driscoll's Tech Blog


Stuff That Happened in the Past

Sunday, May 6, 2012

Debug Shmebug

What? I'm missing a Python.h file? Ok, I'll point MS Visual C++ 6.0 to Python25's INCLUDE folder.

What? I'm missing a python25_d.lib file? Ok, I'll just do a search for it and... What the hey?! Oh, that's right. I did the .msi install of Python 2.5.4 which doesn't include the python25_d.lib file.

So I'll just download 2.5.4 again and... What the...? Ok, cool. I found a nearly dead link to it still. That was a close one. What kind of compression did they use on this .tar whatever? I extracted something... just a huge garbage file. Hmmm... What if I extract the garbage? It's extracting. I don't know what, but it's extracting.

Ok. What do I got here? Files with no extensions (a pet peeve of mine, by the way). I see a README... Lame. I see another README... Something about only MSVC++ 7 can compile this. Panic! What's in this folder?... It says MSVC++ 8 is required. I'm going the wrong direction.

Finally! Something mentioning MSVC++ 6.0 and NT/2000? Hmmm.... I'm doing the math in my head... 1999 was about the time that Microsoft Visual Studio 6 had come out. So XP was not out yet.

Let's see if this Python C source code loads into... It did. But what the hell? Source safe code something or other? Need username and password? After 20 minutes I figured out that I can just hit cancel cancel cancel cancel cancel cancel don't cancel cancel cancel ok.

Ok, what do I compile? Hmmm... Try the Pythoncore one... Boring. Try just the Python one... Hey, I got a DOS version of Python popping up. No IDLE? Close it.

Now let's see what .lib files Visual Studio C++ 6.0 made for me.... I see it! python25_d.lib! Get over here! Ok, now... Copy to C:\Python25\libs...

Breathe.

Ok, now what was I trying to do nearly three hours ago? I remember. Step one of three involving putting a wrapper around a C program so it can be used as a Python extension. Sounds easy enough... Easy as cake. Piece of pie.

Fire up MSVC++ 6 again and look for where my C program was... Ok. Loading, linking, no way! It worked! Up popped a DOS window with the C code running in it.

And that was supposed to be the easy part of wrapping. Only two more steps to go.

No comments:

Post a Comment