473,663 Members | 2,838 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Compiling extension with Visual C++ Toolkit Compiler - MSVCR80.dll

Hi there,

I am trying to install a Python library with a C extension (the
Polygon library) and I am having a bad time. My Python version is
Python 2.4.3 - Enthought Edition 1.0.0 (#69, Aug 2 2006, 12:09:59)
[MSC v.1310 32 bit (Intel)] on Windows XP Pro. I have dutifully
followed the instructions here:

http://wiki.python.org/moin/Building...e_MS_C_Toolkit

i.e.,

- Installed Microsoft Visual C++ Toolkit Compiler 2003
- Installed Microsoft Platform SDK for Windows Server 2003 R2
- Installed Microsoft .NET Framework SDK, version 1.1
- setup the path, include and lib environment variables with a .bat
file, as described in the wiki document

The library seems to build correctly (producing Polygon.py and
cPolygon.pyd), but when I import it I get the following message from
python.exe: "This application has failed to start because MSVCR80.dll
was not found". I thought that this might be due to Python trying to
link against the .dll from Microsoft Visual C++ Express 2005, also
installed on my PC, instead of MSVCR71.dll. So I've removed MS Visual C
++ Express 2005, and any trace of it from my environment variables,
but that doesn't seem to change anything.

Any help would be greatly appreciated.

Regards,

alex

Jan 29 '07 #1
3 3815
al************* **@yahoo.com schrieb:
The library seems to build correctly (producing Polygon.py and
cPolygon.pyd), but when I import it I get the following message from
python.exe: "This application has failed to start because MSVCR80.dll
was not found". I thought that this might be due to Python trying to
link against the .dll from Microsoft Visual C++ Express 2005, also
installed on my PC, instead of MSVCR71.dll. So I've removed MS Visual C
++ Express 2005, and any trace of it from my environment variables,
but that doesn't seem to change anything.

Any help would be greatly appreciated.
Can you find out where msvcrt.lib comes from? If you manage to copy
the linker command line, I think link.exe has a way of telling you
where it picked up the file. If that won't work, and you find multiple
copies of msvcrt.lib on your disk, you can use dumpbin /all on
each of them to find out which one is right.

Regards,
Martin
Jan 29 '07 #2
On Jan 29, 2:47 pm, alexandre_irrt. ..@yahoo.com wrote:
The library seems to build correctly (producing Polygon.py and
cPolygon.pyd), but when I import it I get the following message from
python.exe: "This application has failed to start because MSVCR80.dll
was not found". I thought that this might be due to Python trying to
link against the .dll from Microsoft Visual C++ Express 2005, also
installed on my PC, instead of MSVCR71.dll. So I've removed MS Visual C
++ Express 2005, and any trace of it from my environment variables,
but that doesn't seem to change anything.
Alex, I'm not familiar with the particular problem you're seeing, but
did you try building the polygon library using the gcc that's included
with the Enthought distribution?

python setup.py build_clib build_ext --inplace --compiler=mingw3 2
-Peter

Jan 29 '07 #3
Thanks for your answers Martin and Peter,

I figured out why python.exe was asking for MSVCR80.dll. The first
time I compiled the library, MS Visual C++ Express 2005 was used
during the build (despite my PATH pointing to MS Visual C++ Toolkit
2003). When I removed Express 2005, I forgot to remove the build
directory of my library. I've also had to remove and reinstall the C++
Toolkit, the platform SDK and the .NET Framework SDK and modify
msvccompiler.py and my environment variables according to:

http://www.vrplumber.com/programming...kit/index.html

but finally it did work.

And Peter, your solution worked perfectly. A great alternative to
installing all the MS libraries.

Cheers,

alex

Jan 30 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2362
by: Fuzzyman | last post by:
I'll post this to the image-sig as well, but the audience is a bit wider here. I've just upgraded to Python 2.4. I've installed the free microsoft optimising compiler and hacked distutils to use it - following the instructiosn from http://www.vrplumber.com/programming/mstoolkit/ . It works great and I've built a windows installer for PyCrypto 2.0. I'm attempting to compile PIL for python 2.4. The build instructions for windows say :
6
6168
by: Martin Bless | last post by:
The good news: Along with Python-2.4 comes really good news to Windows users. Yes, you now CAN build extension modules yourself using the SAME C++ compiler and linker Python is built with itself. Everything you need is available at no costs (except download hassle and installation time). Once your system is set up properly its just a matter of running 'python setup.py build'. No longer waiting for someone else to build binaries and a...
0
2062
by: Martin Bless | last post by:
I need to access a MSSQL database (MS-Sql, not MySQL!)and would very much like to use mssql-0.09.tar.gz which is available from http://www.object-craft.com.au/projects/mssql/download.html Unfortunately the binary for Python-2.4 isn't available yet and I'd hate to step back to a previous version. I'm glad I managed to set up my XP machine to being able to compile extensions using the VC++ toolkit which freely availbale from MS. See
2
2947
by: Ney André de Mello Zunino | last post by:
Hello. I gladly learned yesterday that Microsoft was making the Visual C++ Toolkit 2003 available for free. Today, I downloaded and installed it and went on to try building some simple applications. I quickly found out that the toolkit does not come with the multi-threaded versions of the runtime, such as the one I needed to build a bare-bone SDL sample. Does anyone know why they have chosen to not include them and if there is anything...
19
477
by: Jonathan Wilson | last post by:
Is it possible to use vcbuild with the free MS compiler toolkit, as in can someone with just the MS toolkit and no access to a copy of Visual Studio itself use vcbuild to compile a Visual Studio .NET 2003 project? Assuming it is possible, I can then work on getting my specific project to compile under vcbuild+platform SDK+Visual C++ compiler toolkit
0
1333
by: Andreas | last post by:
Extension: --------------- pyshapelib 0.3 with Python 2.4 Problem: ------------- D:\Python24\Lib\site-packages\shapelib\setup>pytest.py Traceback (most recent call last): File "D:\Python24\Lib\site-packages\shapelib\setup\pytest.py", line 1, in ?
9
3799
by: Andreas Schmitt | last post by:
I am workin on a 2 part project right now. The first part is a DLL, the second part a normal exe using that DLL. When I use the VS2005 standard setting for compiling with the Multithreaded-DLL runtime library (compiler option /MD )everything works fine on my PC. But when I try to run the thing on a friends PC or my laptop I get: "This application has failed to start because the application configuration is incorrect.
3
6665
PieCook
by: PieCook | last post by:
Error message: "The application has failed to start because MSVCR80.dll was not found. Re-installing the application may fix this problem." Basically, I recently purchased a game programming book, and was trying to follow along. The book uses the Allegro game library, and I was trying to configure a Visual C++ 8.0 project to compile and link to the library. First, I installed Allegro 4.2 by copying the lib and include folders to the...
6
2570
by: Christian Heimes | last post by:
inhahe schrieb: I assume you are trying to compile Python 2.5 with VS 9.0. It's not supported. Some extensions don't compile under VS 9.0 Christian
0
8858
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8548
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8634
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7371
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5657
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4182
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4349
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1757
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.