[C++-SIG] Problems building and testing CXX demo

Phil Austin phil at geog.ubc.ca
Tue May 9 01:53:36 CEST 2000


Steve Harris writes:

[snip]

 > Can anyone provide some advice on how to build the 'python.cxx' sample
 > interpreter that's supposed to link with the 'example' module?

I can't help with most of this, but here's an example of
a successful build of python.o using KCC under solaris 2.6
(note that this takes less that 2 minutes on an Ultra 1 --
anyone know whether recent gcc snapshots are doing a better
job on templates?)


<peacock ~/mail/cxx-barry-2000-04-30/CXX> time bash -v testit.sh
KCC -c -I/nfs/brant/local1/lib/python/solaris/include/python1.5 -IInclude \
        -I/nfs/brant/local1/lib/python/include/python1.5 -O Demo/python.cxx -o python.o

KCC -c -I/nfs/brant/local1/lib/python/solaris/include/python1.5 -IInclude \
        -I/nfs/brant/local1/lib/python/include/python1.5 -O Src/cxxsupport.cxx  -o cxxsupport.o

KCC -c -I/nfs/brant/local1/lib/python/solaris/include/python1.5 -IInclude  \
        -I/nfs/brant/local1/lib/python/include/python1.5 -O Demo/example.cxx -o example.o

KCC -c -I/nfs/brant/local1/lib/python/solaris/include/python1.5 -IInclude \
        -I/nfs/brant/local1/lib/python/include/python1.5 -O Demo/rtest.cxx -o rtest.o

KCC -c -I/nfs/brant/local1/lib/python/solaris/include/python1.5 -IInclude \
        -I/nfs/brant/local1/lib/python/include/python1.5 -O Demo/r.cxx -o r.o

KCC -c -I/nfs/brant/local1/lib/python/solaris/include/python1.5 -IInclude \
        -I/nfs/brant/local1/lib/python/include/python1.5 -O Src/cxx_extensions.cxx -o cxx_extensions.o

cc -c -I/nfs/brant/local1/lib/python/solaris/include/python1.5 -IInclude \
        -I/nfs/brant/local1/lib/python/include/python1.5 -O Src/cxxextensions.c  -o cxxextensions.o 

KCC -G example.o cxxsupport.o cxx_extensions.o cxxextensions.o  r.o rtest.o -o libcxx.so
C++ prelinker: Recompiling Demo/example.cxx
C++ prelinker: Recompiling Src/cxx_extensions.cxx

KCC  python.o -o mypython  -L/nfs/brant/local1/lib/python/solaris/lib/python1.5/config \
          -lpython1.5 -lm -lnsl -lsocket -ldl ./libcxx.so

71.57u 4.94s 1:33.04 82.2%

<peacock ~/mail/cxx-barry-2000-04-30/CXX> mypython
Greetings. Type from example import *; test()
Python 1.5.2 (#2, Aug 26 1999, 22:59:52) [C] on sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> from example import *
>>> test()
Correctly caught CXX: type error.
  Exception value: CXX: type error.
  Exception traceback: None
Numbers: ok
String: ok
List: ok
Dict: ok
Tuple: ok
STL test: ok
Extension object test: ok.
Module test ok.




More information about the Cplusplus-sig mailing list