473,414 Members | 1,980 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

WindowsXP development using msvc .net 2003

Hola~

I'm developing a c++ library that contains python types and methods on
Windows using MSVC .net 2003 and g++ on Linux.

To compile on Linux, I just compile and I can use a debug compiled
version of my plugin in a vanilla python interpreter. On Windows, it
seems like you have to compile a custom version of python and then
compile my plugin against the debug version of python.

Is that right? I guess I don't understand why the Windows distribution
of Python includes the headers and libraries if only an optimized
plugin could access it. I've compiled my own version of Python (it
worked out of the box), but I wouldn't think I would need to.

Now, I'd like to update my plugin to be able to export a Numeric array
type. On Linux, I just point the compiler at the headers, and it all
seems to work. On Windows, do I have to compile a debug version of
Numeric to do so?

I feel like I'm making things harder than they need to be on Windows.
Any advice on building Python modules on both Windows and Linux would
be appreciated.

MO

Dec 7 '05 #1
1 1196
Michael O'Brien wrote:
Hola~

I'm developing a c++ library that contains python types and methods on
Windows using MSVC .net 2003 and g++ on Linux.

.... On Windows, it seems like you have to compile a custom version of
python and then compile my plugin against the debug version of python.
Is that right? Nope.
I guess I don't understand why the Windows distribution
of Python includes the headers and libraries if only an optimized
plugin could access it. You do need compatible C/C++ libraries for both Python and your module.
Microsoft feels free to change calling conventions and layouts of
some essential data structures (such as the thing pointed to by a FILE*)
between releases of their C/C++ compilers, and depending upon whether
the debug flag is on. On Linux, I'm sure you could buy an exotic C/C++
system from some vendor that produces hyper-optimizing code that would
not mesh well with the pre-built Python. The issue you see is a C/C++
compiler issue.
I've compiled my own version of Python (it
worked out of the box), but I wouldn't think I would need to. You don't need to.
Now, I'd like to update my plugin to be able to export a Numeric array
type. On Linux, I just point the compiler at the headers, and it all
seems to work. On Windows, do I have to compile a debug version of
Numeric to do so? If you are not using a compatible compiler w/ flags, then yes.
I feel like I'm making things harder than they need to be on Windows.
Any advice on building Python modules on both Windows and Linux would
be appreciated.

It does matter which version of python you are discussing -- 2.4
switched from VC 6.0 as the compiler to VC 7.1 (the .net 2003 compiler).
If you are working with 2.3.* or earlier you _will_ need to recompile.
If you are working with 2.4.* or later, your compiler will work, but
it may not work if you turn on debugging.

You might take a look at the vrplumber page, that may help:
http://www.vrplumber.com/programming/mstoolkit

I also have some code to "monkey patch" distutils (change at runtime
without having to alter any source code) if distutils seems to
be the problem.

--Scott David Daniels
sc***********@acm.org
Dec 7 '05 #2

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

Similar topics

1
by: dayzman | last post by:
Hi, Does anyone know how I can use "icl" (Intel C++) to compile C extensions? I'm on Windows, and my Python is compiled using VS7.1 (binary distribution). Right now, when I run setup.py install,...
35
by: Michael Kearns | last post by:
I've been using python to write a simple 'launcher' for one of our Java applications for quite a while now. I recently updated it to use python 2.4, and all seemed well. Today, one of my...
2
by: Manfred Eckschlager | last post by:
Hi, In Linux C++ there was an easy way to build a stream form a socket like: int sockFd = socket(AF_INET,SOCK_STREAM,0); filebuf *netBuf = new filebuf( sockFd ); -and then iostream...
1
by: Dennis Gearon | last post by:
For a price, you can get WAP2 Windblows Apache Postgres PHP http://www.phpgeek.com/ "*2003-08-29 - PostgreSQL Running in Pragmapool Labs*
0
by: 3doutpost | last post by:
(apologies for the new thread - for some reason google news doesn't give me the option to reply to an earlier vcbuild.exe thread) I'm trying to build a C++ project that was originally created in...
8
by: Chris Stankevitz | last post by:
I can't tell you how frusterated I and my coworkers are with "MSVC 7.1 .net 2003" (what am I supposed to call this thing anyway?). Compiling and linking take twice as long with "MSVC 7.1 .net...
0
by: Pedro Lucas via .NET 247 | last post by:
I have a weird .RC corruption problem with MSVC .NET 2003. I have a .RC file that has been in use for years with .NET inside a project called Netcount. Recently I upgraded to .NET 2003 and...
1
by: Dean Slindee | last post by:
Would like to use WindowsXP graphics themes (like shaded tab page in tab control), but am using Windows 2000 operating system. Using Visual Studio 2005 and .Net Framwork 2.0. Have the option...
3
by: salunkerahul | last post by:
Hello All, I have some static libraries generated on MSVC 2005 express edition and I have to use them along with static libraries created with MSVC 2003 and create an application on MSVC2003. ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...
0
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...
0
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...

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.