Hi PGI Users,
I am trying to build iphreeqc library (source can be found here https://water.usgs.gov/water-resources/software/PHREEQC/iphreeqc-3.4.0-12927.tar.gz) with PGI compilers (18.4 community edition), this is the configure line:
CXX=pgc++ CC=pgcc FC=pgfortran ./configure --prefix=$DEV_lib_dir/iphreeqc --enable-fortran-module --enable-fortran-test
Once I start compiling with make I got the following errors:
CXX phreeqcpp/transport.lo
"phreeqcpp/transport.cpp", line 1: error: unrecognized token
#include "Utils.h"
^
"phreeqcpp/transport.cpp", line 1: error: expected a declaration
#include "Utils.h"
^
"phreeqcpp/transport.cpp", line 1: error: unrecognized token
#include "Utils.h"
^
"phreeqcpp/transport.cpp", line 1: error: unrecognized token
#include "Utils.h"
^
"phreeqcpp/transport.cpp", line 1: error: "#" not expected here
#include "Utils.h"
^
"/usr/include/c++/5/bits/postypes.h", line 98: error: identifier "ptrdiff_t" is
undefined
typedef ptrdiff_t streamsize; // Signed integral type
^
"/usr/include/c++/5/iosfwd", line 76: error: char_traits is not a template
template<typename _CharT, typename _Traits = char_traits<_CharT> >
^
"/usr/include/c++/5/iosfwd", line 79: error: char_traits is not a template
template<typename _CharT, typename _Traits = char_traits<_CharT> >
^
... a lot more errors ...
"/usr/include/c++/5/bits/basic_string.h", line 4999: error: basic_string is not
a template
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4999: error: nonmember operator
requires a parameter with class or enum type
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 5012: error: basic_string is not
a template
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
^
"/usr/include/c++/5/bits/basic_string.h", line 5011: error: nonmember operator
requires a parameter with class or enum type
operator<(const _CharT* __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 5024: error: basic_string is not
a template
operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
Error limit reached.
100 errors detected in the compilation of "phreeqcpp/transport.cpp".
Compilation terminated.
I used gcc compilers without problems, what could be the problem here?
Thank you for your help,
Best regards,
Hector