[Met_help] building MET on Ubuntu 9.10
John Halley Gotway
johnhg at ucar.edu
Mon Feb 8 10:15:03 MST 2010
Cory,
Thanks for sending these details. I'm sorry to hear you had such a difficult time building MET on Ubuntu. Can you please tell me the names and version numbers of the compilers you were using?
Thanks,
John Halley-Gotway
johnhg at ucar.edu
Cory Davis wrote:
> Hi there,
> I have had to make quite a few changes in order to compile MET v2.0 with
> all patches METv2.0_patches_20091223.tar.gz on my Ubuntu 9.10 machines.
>
> These changes include adding
> #include <cstdio>
> to
> ./lib/vx_cal/time_strings.cc
> ./lib/vx_econfig/machine.cc
> ./lib/vx_met_util/stat_hdr_columns.cc
> ./lib/vx_util/ascii_table.cc
> ./lib/vx_util/concat_string.cc
> ./lib/vx_util/string_fxns.cc
> ./lib/vx_util/threshold.cc
>
> this is in order to have sprintf, fopen and fclose defined.
>
> Also, the use of the strrchr function in
> ./lib/vx_met_util/file_type.cc, and
> ./lib/vx_met_util/stat_columns.cc
> is not quite right. In C++ you are apprently allowed
>
> const char * strrchr ( const char * str, int character );
> char * strrchr ( char * str, int character );
>
> and NOT
> char * strrchr ( const char * str, int character );
>
> so to get around this I have done this
> ./lib/vx_met_util/file_type.cc:43
> if((ptr = (char *) strrchr(filename, '.')) != NULL) {
>
> and
> ./lib/vx_met_util/stat_columns.cc:
>
> ./lib/vx_met_util/file_type.cc
> line 44: if((ptr = (char *) strrchr(filename, '.')) != NULL) {
> const char * strrchr ( const char * str, int character );
> char * strrchr ( char * str, int character );
>
> ./lib/vx_met_util/stat_columns.cc:411
> if((ptr = (char *) strrchr(col_name, '_')) != NULL) i = atoi(++ptr);
>
> Cheers,
> Cory
>
>
More information about the Met_help
mailing list