472,328 Members | 1,158 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Problem with custom build with MSVC8

Hello, and thank you for the time,

I'm currently in a project where I need to support 2 versions of the same program.
One version (the current one) uses Python 1.5.2, the new version, which I'm currently building, must use Python 2.5.

To ensure maximum compatibility between the 2 versions, I want to change import.c of Python 2.5. And I want to make a static library (so that no end user can accidently replace the lib).

But before I do that, I want to do a test build (of Python) to see if it builds correctly.
Here is where I hit the problem.

I've looked through pyconfig.h and saw that I needed to define Py_NO_ENABLE_SHARED to disable dynamic linking (which I did).

But I'm having some problems with actually building it.
I don't need MSI or SQLite (so I've unloaded them).
But for some reason I can't seem to get it compiled (not even out of the box).

I'm using Microsoft Visual Studio 2005 Profesional, on a Windows XP Pro box.



To rephrase it, I want to compile Python 2.5 as a static library without MSI and sqlite.

If I can get it compiled, then it's a small step to edit import.c for my needs.

Thank you for your time,

MLeo
Sep 29 '06 #1
4 1515
I'm sorry for the bump, but if there is something unclear, please let me know, and I'll be able to clarify it some more.
Oct 11 '06 #2
bartonc
6,596 Expert 4TB
Sounds like you are complicating your life. Why not just compile you program as a module and import it. I use SWIG on xp. It comes with sample projects for VS.
Oct 11 '06 #3
I didn't design the original program. I just need to make sure I can use the original scripts without overwriting all old pyc files.
There is a PEP that could be usefull here, but I'd like to simply append 25 at the end of the pyc.


I just need a static library (think I can do that easily) without the sqlite and msi baked into it.
I think I've made the needed changes to import.c to make my original intentions work.


Actually, the pyc25 is optional, but the static linking is required.


Am I wrong to think that the pythoncore project in the PCBuild8 generates the dll?
Oct 13 '06 #4
bartonc
6,596 Expert 4TB
Because I have never tried to compile python itself, I don't know about PCBuild8.
I am almost certain that any library, whether for import or static, must be compiled with the correct version of python.h and python.lib. You don't need the original source code, but you do need the header and .lib files for your extension.
Oct 14 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Jose Vicente Nunez Z | last post by:
Greetings, I wrote a couple of custom dummy extensions in Python (one a pure Python and the other a C) and i managed to compile and install...
2
by: Helmut Jarausch | last post by:
Hi, I'd like to install SCons (http://www.scons.org) on my Linux box. There, the cvs version of Python is running. Doing as recommended in the...
7
by: Mr. Mountain | last post by:
Hi, I am building a custom wizard engine in C# following the example in "Mastering Visual Studio.NET" by Griffiths, Flanders and Sells (pg 304)....
0
by: maitrepoy | last post by:
I have to create a small addin which works on Powerpoint, Word, Outlook, and Excel on Office 2000, XP, and 2003. This addin consists in adding 2 new...
2
by: Peter Ritchie | last post by:
In VS/VC 2003: Simple question: for the Custom Build Step for the project (right click the project in the Solution Explorer, select "Properties",...
7
by: Dino Buljubasic | last post by:
Hi, I am using C# 2.0 (VS2005) to build my user control that contains a number of dynamically loaded ListViews. ListViewItems have their...
0
by: Michael Russell | last post by:
Hi, I'm beginning the process of moving some projects from VS.Net 7 to VS2005. I'm having problems getting a Custom Build Step to work. In the...
1
by: Michael Russell | last post by:
Hi all, Sorry for the repost, but I never received any response when I first asked this a few weeks ago. I would really appreciate some feedback...
2
by: teixeira1985 | last post by:
Hi , Due an unknown cause VS2005 started to show an error when i switch from code to design in windows forms projects. I repaired the...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

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.