Embedding Python w/ Borland C++ 5.5

mik at geosys.ru mik at geosys.ru
Sat Apr 7 10:50:18 EDT 2001


07.04.01 14:46:33, "Gregg T. Geiger" <gt.geiger at worldnet.att.net> wrote:

>Is anybody familiar w/ the specifics of how to embed Python (say 2.0) using
>the Borland compiler?  I understand there may be a leading underscore issue
>associated with the Python names designed to work w/ MS Visual C++.

Hello, Gregg!

All the information I could find on the Net was related to building Python extensions with Borland C++ compilers not embedding Python into Borland C++ projects. Though I have lost the exact link (most probably, try to 
search mail list archives), I here attach a zip-ped archive of the most comprehensive guide I have found. It also include a pre-built Borland import library for the MSVC-compiled Python 1.52. You can also generate it for 
any version by hand:

	> coff2omf -lib:ms pythonXX.lib pythonXX_bcc32.lib

I have tryed to recompile one tool which embeds Python and is usually build with MSVC -- that is omniidl from omniORB distribution by AT&T Laboratories Cambridge 
<http://www.uk.research.att.com./omniORB/omniORB.html> -- but to no success. The programs built with BCC32 o.k., but crash on execution shortly after calling Python interpreter. This behaviour is nearly similiar 
with both Python 1.52 and 2.0 MSVC-built libraries.

Then I tryed to rebuild Python 2.0 with BCC32. Though the sources have some Borland-specific stuff in them already, it was insufficient. I had to apply some minor modifications which you can find along with project 
and makefiles at my site <http://astra.geosys.ru./devel/omniORB3/#python>. The library builds successfully but both omniidl and pythonw (also rebuilt with BCC32) crashes on it.

I have no spare time now to dig into this problem, nor am I quite familiar with Python internals to feel sure doing so. I would appreciate if you inform me of any additional information found concerning this topic.

Best regards,
		Mikhail Soukhanov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BorlandpyExt30.zip
Type: application/x-zip-compressed
Size: 264904 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20010407/0ed2db69/attachment.bin>


More information about the Python-list mailing list