473,772 Members | 3,672 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using python23 to develop an extension for an application that has python22 embedded

Can I use python23_d and python23 to develop an extension for a
commercial application uses python22.dll? (Providing that I do not use
any new features found only in 2.3.)

I would bulld version 2.2 but I am having trouble doing this with
Visual Studio .NET Standard. (There is a well documented problem with
version 2.2 (involving largeint.h) and VS.NET but none of the
solutions that I found have worked.)

On the other hand, I have successfully built release and debug
versions of pythoncore with VS.NET.

Thanks
Jul 18 '05
10 2518
Andrew MacIntyre wrote:
You can then use another compiler supported by the
Distutils (MS CL non-optimising compiler, MinGW,
Borland etc) to build the distributable extension in
either a Python 2.2 or 2.3 installation, without risking
mixing C runtime library mismatches (VS.NET uses a
different CRT than VS6 I understand). If using a 2.3
installation, you'll need to substitute a 2.2 import
library when building the final distributable version.


Do I understand you correctly? It sounds like you are saying there is a
problem using a DLL built with VC6 and another DLL built with VS.NET in the
same application, but if you were to use a Borland or other compiler, then
you would avoid this problem.

That's not right at all. It's commonplace to have multiple DLLs loaded into
a Windows application, all built with different compilers and all using
different C runtimes. You can have one built with VC6, another with VS.NET,
and another with Borland or any other compiler. You certainly don't need to
build a DLL with Borland instead of VS.NET to avoid conflicts with another
DLL that was built with VC6.

If python22.dll has some incompatibility with other DLLs that are built with
VS.NET, then there is something seriously wrong with python22.dll.

If I misunderstood you, let me know what it was that you were getting at
here.

BTW, if you're distributing a DLL or application built with VS.NET, you do
need to make sure that the appropriate C runtime is available on the target
system. In many cases, the best way to do this is to compile and link with
the static C runtime instead of the DLL C runtime. If you use the DLL
version of the C runtime, you need to distribute it with your app or DLL.

To be sure of what other DLLs (C runtimes or whatever) your DLL or app
depends on, the best tool is Dependency Walker:

www.dependencywalker.com

-Mike
Jul 18 '05 #11

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

Similar topics

3
4515
by: David Isal | last post by:
hi all, i'm new to python and i'm trying to build a python extension on win98, written in c++, with cygwin. but i keep having the same error message, and i didnt't find much resources on the web about it: >g++ -I/cygdrive/c/python22/include -c demomodule.cpp -o demomodule.o In file included from /cygdrive/c/python22/include/Python.h:62, from demomodule.cpp:1: /cygdrive/c/python22/include/pyport.h:480:2: #error "LONG_BIT definition
7
7188
by: Carl Waldbieser | last post by:
I tried to adapt the instructions for building the M2Crypto module (http://sandbox.rulemaker.net/ngps/m2/INSTALL.html) to build a version compatible with Python2.3, but I've had some mixed results. I actually got everything to build and install, but when I try to import M2Crypto-- well, here is a sample session: >>> import M2Crypto Traceback (most recent call last): File "<interactive input>", line 1, in ? File...
3
3206
by: Anand | last post by:
I have a unexpected issue with python modules (well i kind of know why, but i am trying to find if there is a way around) Intro: I am allowing an external application to actually run python scripts. The external application i am taking about is a test sequencer with a lots of functionality. So the external application has a lot of gui and all the testing logic is done in python. Things work fine when i run regular code and i have been...
9
2050
by: Dan Williams | last post by:
Hi people I'm getting a little annoyed with the way the print function always adds a space character between print statements unless there has been a new line. The manual mentions that "In some cases it may be functional to write an empty string to standard output for this reason." Am I the only the who thinks that this sucks? It's the first thing I've come across in Python that I really think is a design flaw. Is there a good way to...
2
4262
by: C. Barnes | last post by:
Normally, one uses the following procedure to build and install a C/C++ extension: python setup.py build --compiler=your_compiler python setup.py install For Python 2.3.3 on Windows, with the Mingw (Minimalist GNU) compiler, the following steps must be taken:
15
3226
by: James Stroud | last post by:
Hello, My department has switched from vmware to wine/cxoffice. I have been playing with this all morning, and I've gotten this far. If someone has done this, could you point me in the right direction euler 65% winpy Enthought Edition build 1057 Python 2.3.3 (#51, Feb 16 2004, 04:07:52) on win32 Type "help", "copyright", "credits" or "license" for more information. py> from distutils.core import setup
6
5822
by: justsee | last post by:
Hi, I'm using Python 2.3 on Windows for the first time, and am doing something wrong in using urllib to retrieve images from urls embedded in a csv file. If I explicitly specify a url and image name it works fine(commented example in the code), but if I pass in variables in this for loop it throws errors: --- The script: import csv, urllib
0
2504
by: Chris Fink | last post by:
I have walked through all of the WSE 3 Hands on Labs and got everything working fine. When I create my own certificate and install it in the stores, my client application that is consuming my WSE enabled webservice receives the following error (noted at the very bottom of this post). My objective here is to create and secure a service application (webservice) using an x509 test cert that requests a client certificate; and to create a...
3
2268
by: Martin Schneider | last post by:
Hi! I'd like to use the numpy library (which runs on Python 2.5) in the same project with another (mandatory) library which needs python22.dll. When I try to compile I get an error similar to "python22.dll not compatible with the current Python version." Has anybody an idea how to solve this? Thanks for your ideas.
0
10104
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
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
9912
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
8934
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
7460
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
6715
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
5354
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...
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2850
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.