This problem had already been fixed and will be available in the next release (which I'm hoping will before June 1). Your fix is fine but suboptimal. The problem is that identifiers starting with
The source code for an alpha version of the new release is in the distrib-C++ directory under files download tab. This is NOT FOR USE IN PRODUCTION. I might (will!) change the tar/zip files without warning. This is version 2.0 which folds in lots of changes (yet to be documented) in how things are organized.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
Had problem to build r1.52 on SUN/Solaris (SunOS 5.11 11.3 sunv4 sparc), got error (shortened as build on another machine with restrictions) as below:
…/build $ cmake ..
…
[ 84% ] Building CXX object tools/CMakefiles/GeodSolve.dir/GeodSolve.cpp.o
In file included from /usr/include/wctype.h:12:0,
…
…/tools/GeodSolve.cpp:12:
…/include/GeographicLib/GeodesicLineExact.hpp:46:33: error expected unqualified-id before numeric constant
_A4, …, _E1, …
^
. ### Found that file wctype.h includes file iso/wctype_iso.h which contains definition “for character class” with first line as below:
. #define _E1 0x00000100 / phonogram (international use) /
=> My solution was to modify: _E1 to __E1 in files …/include/GeographicLib/GeodesicLineExact.hpp and s…/src/GeodesicLineExact.cpp
PS.
Thanks for good work;)
DS.
// Best regards, Per-Arne Söderkvist, flight simulation engineer
This problem had already been fixed and will be available in the next release (which I'm hoping will before June 1). Your fix is fine but suboptimal. The problem is that identifiers starting with
are "reserved", see https://en.cppreference.com/w/cpp/language/identifiers
My fix was to change
_E1
to_eE1
. That's better than using__E1
. I recommend you do the same as me in case Sun decides to use__E1
for something.Thanks for quick answer;)
The source code for an alpha version of the new release is in the
distrib-C++
directory under files download tab. This is NOT FOR USE IN PRODUCTION. I might (will!) change the tar/zip files without warning. This is version 2.0 which folds in lots of changes (yet to be documented) in how things are organized.