[SciPy-user] weave and compilers other than GCC 2.95?

eric jones eric at enthought.com
Tue Aug 27 18:29:07 EDT 2002


> > Hey Steve,
> >
> > Your in new territory here.  The only compilers I have used are
> > gcc-2.95.3 and MSVC.
> 
> OK.  The problem is less severe than I first feared.  I have managed
> to kill most of the error messages by adding "typename" keywords,
> changing templates like the following
> 
>   template <class T> bool operator==(const SeqBase<T>::iterator& left,
> 				     const SeqBase<T>::iterator& right);
> 
> to
> 
>   template <class T> bool operator==(const typename
SeqBase<T>::iterator&
> left,
> 				     const typename
SeqBase<T>::iterator& right);
> 
> I'm still trying to figure out what to do about
> random_access_iterator, apparently a non-standard STL class that can
> be replaced somehow with std::iterator.

No clue on this.

> 
> Also: the code includes the deprecated <strstream> header.  At the
> moment, this only elicits a warning that I'm ignoring.

OK.  If this is in CXX, it'll automatically be gone in the new version.
If it is injected by weave, we'll remove it for the new version.

> 
> 
> > The second issue is that distutils doesn't automatically handle
building
> > C++ libraries.  Weave uses a hack that replaces gcc with g++ if gnu
is
> > used.
> 
> Ah, I didn't notice that.  I thought you were relying on the fact that
> SGI "cc" (like gcc) will detect the language based on the input file
> extension (.c or .cxx, etc).  I was actually rather surprised to learn
> that SGI's compiler does that.

Right gcc does also.  The problem comes at the link step. Using gcc to
link doesn't include the stdc++ (or equivalent) library. Linking with
g++ does.

> 
> > g++ links in the correct libraries for cout, etc. while gcc
> > doesn't.  I'm betting your hitting a similar problem.
> 
> The messages about "cout" were my own fault (blush) -- they came from
> the code I was trying to weave.

Ahh.  I'm guessing you needed std::cout.

> 
> > One temporary fix
> > might be to try libraries=['stdc++'] as an inline() keyword
argument.
> >
> > >   #error directive:  This header file requires the -LANG:std
option
> >
> > Yikes!  This looks like something we'll just have to hard code when
MIPS
> > is detected.  Or maybe if we build with the MIPS c++ compiler (is it
> > different than the c compiler on this platform?) this flag will
> > automatically be set.  I can't imagine a C++ compiler having to have
a
> > flag set to use the std namespace files.
> 
> Guess again.  :-(  The MIPS C++ compiler is named "CC"; but yes, you
> need -LANG:std to get something closer to current standards.  At least
> with MIPSpro 7.30 compilers (which, admittedly are a few years old).

I think that is the latest though, correct?

> 
> 
> > With the change to SCXX, inline() should theoretically
> > work everywhere.  blitz() on the other hand... I think that is still
> > relegated to the world of gcc.
> 
> Uh, oh.  What about inline( ... type_converters = converters.blitz
...)?

I'm betting there is bad news here.  Blitz++ works 
> 
> 
> -Steve
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user




More information about the SciPy-User mailing list