bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 4 errors generated when compiling Quad_MX,hh


From: Paul Rockwell
Subject: Re: 4 errors generated when compiling Quad_MX,hh
Date: Sun, 1 Dec 2024 23:56:13 -0500

Peter (and Jűrgen) 

I am seeing this same error when compiling on macOS 15 Sequoia on Apple Silicon with XCode 16.1 command line tools and using the default ./configure options (that is, no options at all). 

I normally compile GNU APL with non-default options. The one that standsout to me (and I did this to try and match the behavior of the GNU C++ compiler on current versions of Linux_ was to bump the standard being used by the compiler to g++17. With this configuration, I do not see the compiler errors that Peter is seeing.

Some investigation shows that the man page for c++ on my Mac says that default C++ standard use by the compiler is gnu++98.

So, I re-ran the configure with ./configure CXXFLAGS="-O2 --std=gnu++11" to select a more modern C++ stamdard. the compilation runs successfully.  

Verifying what was said by the man page, I ran the following:

echo '' | g++ -xc++ -E -dM - | grep cplusplus    


My system returns:

x@y trunk % echo '' | g++ -xc++ -E -dM - | grep cplusplus

#define __cplusplus 199711L


which indicates thet the default C++ standard being used by the compiler pre-dates c++11 - confirming what the man page said..

Running the following to select a more modern C++ standard:

x@y trunk % echo '' | g++ -xc++ -E -dM -std=c++11 - | grep cplusplus

#define __cplusplus 201103L

indicates that the language standard being used is C++11. So in my mind the  problem is either a consruct being used by the new source code that's not acceptable to the earler C++ standard, or the Apple compiler is being really picky about that syntax in the earlier standard. 

I think I've got a High Sierra VM hanging around that I might be able to install the XCode command line tools on so I can test to see if gnu++11 is a supported standards option. If that's the case, I'll download the latest GNU APL
SVN and see if it compiles successfully.

 I'll do that tomorrow for you.

- paul


On Dec 1, 2024, at 2:03 PM, Peter Teeson <pteeson@me.com> wrote:

In file included from ./../Workspace.hh:34:
./../Quad_MX.hh:99:31: error: a space is required between consecutive right angle brackets (use '> >')
         vector<complex<double>> *vals;
                              ^~
                              > >
./../Quad_MX.hh:114:31: error: a space is required between consecutive right angle brackets (use '> >')
  static vector<complex<double>> getCross(Matrix * mtx);
                              ^~
                              > >
./../Quad_MX.hh:120:57: error: a space is required between consecutive right angle brackets (use '> >')
  static complex<double> magnitude(vector<complex<double>> &v);
                                                        ^~
                                                        > >
./../Quad_MX.hh:52:47: error: a space is required between consecutive right angle brackets (use '> >')
              vals = new vector<complex<double>>(r * c);
                                              ^~
                                              > >





reply via email to

[Prev in Thread] Current Thread [Next in Thread]