c/c++ wrapper compilation/ gcc 4.8.5 Centos 7

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10164
    Anonymous
    Inactive

    Hi,

    I’m trying to compile the C++ wrapper from RTTOV v11.3 on Centos 7 (gcc 4.8.5) but it doesn’t work. I have compilation errors (at the end of this message).
    With Centos 6 (gcc 4.4.7), I don’t have any problem.

    With RTTOV v12, the compilation of the c++ wrapper is working with gcc 4.8.5 but, in my project, I have to use RTTOV v11.3 on Centos 7…

    In conclusion, my question is : do you know how to compile the c++ wrapper from RTTOV v11.3 (some options) with gcc 4.8.5 ?

    Thank you,

    Regards,

    Nicolas.

    cc -w -g -fPIC -std=c99 -I. -c interface_example_c.c
    gfortran -g -fPIC -I. -o interface_example_c interface_example_c.o -L../lib -lrttov11_wrapper -lrttov11_other -lrttov11_emis_atlas -lrttov11_brdf_atlas -lrttov11_parallel -lrttov11_coef_io -lrttov11_hdf -lrttov11_main -L/opt/hdf5/latest/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lz -lm
    c++ -w -g -pg -fPIC -std=c++0x -I. -c interface_example_cpp.cpp
    gfortran -g -fPIC -I. -o interface_example_cpp interface_example_cpp.o -L../lib -lrttov11_wrapper -lrttov11_other -lrttov11_emis_atlas -lrttov11_brdf_atlas -lrttov11_parallel -lrttov11_coef_io -lrttov11_hdf -lrttov11_main -L/opt/hdf5/latest/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lz -lm -lstdc++
    c++ -w -g -pg -fPIC -std=c++0x -I. -c Rttov.cpp
    In file included from Rttov.cpp:20:0:
    ./Rttov.h:46:5: error: �rttov::Options::Options� nombra el constructor, no el tipo
    Options::Options options;
    ^
    ./Rttov.h:132:5: error: �rttov::Profiles::Profiles� nombra el constructor, no el tipo
    Profiles::Profiles * profiles;
    ^
    Rttov.cpp: En el constructor �rttov::Rttov::Rttov()�:
    Rttov.cpp:39:50: error: la clase �rttov::Rttov� no tiene ning�n campo llamado �profiles�
    surfemisrefl_k(NULL),simplecloud_k(NULL),profiles(NULL),
    etc….

    #10165
    James HockingJames Hocking
    Keymaster

    Hi Nicolas,

    There are some issues with specified namespaces which cause issues with newer versions of gcc in the Rttov.h and RttovSafe.h header files.

    Can you replace the header files with these versions and try compiling again:
    http://nwp-saf.eumetsat.int/downloads/rttov11_files/Rttov.h
    http://nwp-saf.eumetsat.int/downloads/rttov11_files/RttovSafe.h

    Please let me know if this solves the problem.

    Best wishes,
    James

    #10167
    Anonymous
    Inactive

    Thank you for your answer. I just tested to replace the Rttov*.h files and the compilation is working now.

    Again thank you very much !

    Regards,

    Nicolas.

    #10168
    James HockingJames Hocking
    Keymaster

    Great, thanks for letting me know it worked: I’ll add a note to the bugs/known issues table for v11.3.

    James

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.