Satellite Application Facility for Numerical Weather Prediction › Forums › RTTOV › Older Versions › RTTOV 11 › RTTOV 11 General Discussion › c/c++ wrapper compilation/ gcc 4.8.5 Centos 7
- This topic has 3 replies, 2 voices, and was last updated 7 years, 8 months ago by James Hocking.
-
AuthorPosts
-
April 20, 2017 at 4:10 pm #10164AnonymousInactive
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….April 21, 2017 at 8:31 am #10165James HockingKeymasterHi 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.hPlease let me know if this solves the problem.
Best wishes,
JamesApril 21, 2017 at 9:29 am #10167AnonymousInactiveThank 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.
April 21, 2017 at 10:09 am #10168James HockingKeymasterGreat, thanks for letting me know it worked: I’ll add a note to the bugs/known issues table for v11.3.
James
-
AuthorPosts
- You must be logged in to reply to this topic.