OK, thanks.  I've tried this, the results are:

The Borland utility implib won't touch these libraries either.  It complains
that they are of an unknown file type.  I forget, does the contents of a
COFF file start with the letters COFF?  python20.lib starts with !<arch>.

The new gcc fared slightly better.  With the gcc and nm from the current
cygwin tree (versions 2.95.2 and 2.10.90 respectively) the tools would
recognise and link with python20.lib.  However, this only resolved about two
thirds of the missing symbols.  A number, for example _imp__PyExc_NameError,
can be found by grepping the library (and only in that library) but not in
the nm listing and won't be resolved by gcc.

So, still stuck.  I'll see if I can get MSVC installed and try that.

Cheers,

Andy S.


-----Original Message-----
From: Troy Noble [mailto:[EMAIL PROTECTED]]
Sent: 06 October 2000 18:46
To: 'David Ascher'; Andy Southgate
Cc: '[EMAIL PROTECTED]'
Subject: RE: What format are those files in Python20/Libs?


First off, I would recommend getting Inprise's Free Borland C++ 5.5
compiler (Inprise is formerly Borland).  It's free for download on
the Inprise web site at:

http://www.inprise.com/bcppbuilder/freecompiler/

Be sure to also download the patch 1 and patch 2 so you get the later
version of the Platform SDK.

You can use implib.exe in the bcc55\bin directory convert the COFF
libraries in the Python distribution to the format recognized by the
TurboLinker32 (I think they call it UMF or some such thing).  Then you
can link against those implib-generated libraries with TurboLinker
(tlink32.exe?).

Now back to cygwin.

AFAI cygwin b20.1 did not include mingw32.  The latest version of cygwin
integrates mingw32.  The beta version can be downloaded from the FTP sites
such as:

ftp://ftp.freesoftware.com/pub/sourceware/cygwin/latest

other mirrors are listed on http://sources.redhat.com/cygwin/mirrors.html

You can download the whole tree and run the setup.exe to install from
your local hard drive, or just download the setup.exe and run it
to install via FTP.  It's pretty slick.

If you run their setup program you'll get the latest gcc, gdb, ld, etc.
To compile using mingw32 support, you need to use -mno-cygwin on the
g++ or gcc command line.  Am honestly not sure what the command line
flag is to cause 'ld' to use mingw32, I just use gcc -mno-cygwin for linking
too and let it call ld for me.  I know you can link to coff libraries, but
honestly can't recall if it works directly or if you have to run a separate
utility (similar to implib that Inprise supplies) to convert from coff to
another format first.

Sorry, I have fuzzy memory.

Hope this helps.

Troy

-----Original Message-----
From: David Ascher [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 06, 2000 11:22 AM
To: Andy Southgate
Cc: '[EMAIL PROTECTED]'
Subject: Re: What format are those files in Python20/Libs?


> I've been trying to use Python20 under NT4 with SWIG, and I've reached a
> dead end trying to link in symbols like _imp__PyArg_ParseTuple and its
> friends which are needed by the SWIG-generated wrapper.  It looks (from a
> bit of grepping) like these are in libs/python20.lib but I can't
> successfully link or run nm on those .lib files.  It might be because I'm
> compiling with cygwin b20.1 and it doesn't recognise the format.

Yup, I suspect that's the problem.  ActivePython was compiled with MSVC
6.0, and I don't think those libraries are compatible w/ cygwin's gcc by
default.  I think that with a fair bit of work, one can use either cygwin
or mingw32 (I think that's the name) to create libs which are compatible,
but I'm afraid I don't know the details.

Someone else on the list may have better pointers.

-- David Ascher
   ActiveState

_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activepython
_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activepython

Reply via email to