[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20031120: netcdf 3.5.0 installation using g++ as C++ compiler
- Subject: 20031120: netcdf 3.5.0 installation using g++ as C++ compiler
- Date: Thu, 20 Nov 2003 15:13:15 -0700
Hello C. Mortin,
> To: address@hidden
> From: address@hidden
> Subject: netcdf 3.5.0 installation
> Organization: McGill
> Keywords: 200311202026.hAKKQVEH021563 netCDF Linux g++
The above message contained the following:
> I am having trouble installing netcdf as it seems my C++ compiler isn't
> being recognized. The reqested information follows.
>
> Thanks,
> C. Mortin
>
>
> A:
> Linux oscar.vision.mcgill.ca 2.4.20-19.9smp #1 SMP Tue Jul 15 17:04:18 EDT
> 2003 i686 i686 i386 GNU/Linux
>
>
> B:
> 3.5.0
>
>
> C:
> [cath@oscar src]# which gcc
> /usr/bin/gcc
> [cath@oscar src]# which g++
> /usr/bin/g++
>
>
> D:
> [cath@oscar src]# more configure.log
> creating cache ./config.cache
> checkicreating cache ./config.cache
> checking for top-level source-directory
> /usr/local/mni/netcdf-3.5.0/src
> checking for m4 preprocessor
> checking for m4... m4
> checking m4 flags... -B10000
> checking C compiler "/usr/bin/gcc"... works
> checking how to make dependencies... false
> checking for /usr/bin/g++... /usr/bin/g++
> checking C++ compiler "/usr/bin/g++"... configure: warning: /usr/bin/g++
> failed on test program
> configure: warning: Could not find working C++ compiler
> configure: warning: Setting CXX to the empty string
> configure: warning: The C++ interface will not be built
...
The reason for the above failure of the C++ compiler is in the file
"config.log":
> This file contains any messages produced by compilers while
> running configure, to aid debugging if configure makes a mistake.
>
...
> configure:1189: checking for /usr/bin/g++
> configure:1225: checking C++ compiler "/usr/bin/g++"
> configure:1243: /usr/bin/g++ -o conftest -Df2cFortran conftest.C 1>&5
> In file included from /usr/include/c++/3.2.2/backward/iostream.h:31,
> from configure:1235:
> /usr/include/c++/3.2.2/backward/backward_warning.h:32:2: warning: #warning
> This file includes at least one deprecated or antiquated header. Please
> consider using one of the 32 headers found in section 17.4.1.2 of the C++
> standard. Examples include substituting the <X> header for the <X.h> header
> for C++ includes, or <sstream> instead of the deprecated header
> <strstream.h>. To disable this warning use -Wno-deprecated.
> In file included from /usr/include/c++/3.2.2/cstdlib:52,
> from /usr/include/c++/3.2.2/bits/stl_algobase.h:67,
> from /usr/include/c++/3.2.2/memory:54,
> from /usr/include/c++/3.2.2/string:48,
> from /usr/include/c++/3.2.2/bits/localefwd.h:49,
> from /usr/include/c++/3.2.2/ios:48,
> from /usr/include/c++/3.2.2/ostream:45,
> from /usr/include/c++/3.2.2/iostream:45,
> from /usr/include/c++/3.2.2/backward/iostream.h:32,
> from configure:1235:
> /usr/include/stdlib.h:612: declaration of `void exit(int) throw ()' throws
> different exceptions
> configure:1232: than previous declaration `void exit(int)'
> configure: failed program was:
> #line 1230 "configure"
> #include "confdefs.h"
> #ifdef __cplusplus
> extern "C" void exit(int);
> #endif
>
> #include <iostream.h>
> int main() {
> cout << "";
> return 0;
> }
This is a well-known problem. The solution is to use the latest "beta"
version of the netCDF package (don't be put-off by the "beta" label).
This latest version can be found at
<ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-beta.tar.Z>
Regards,
Steve Emmerson