Closed jonniebeeb closed 1 year ago
Thanks for providing a solution for this problem. I can not reproduce this on my machine:
@jonniebeeb Can we close this issue?
Yes please close this issue.
John
BBC Research & Development The Lighthouse | White City Place | 201 Wood Lane | London | W12 7TQ T: +44 (0)30 304 09617
From: Daniel Silhavy @.> Sent: 16 December 2022 9:36 AM To: 5G-MAG/rt-mbms-modem @.> Cc: jonniebeeb @.>; Mention @.> Subject: Re: [5G-MAG/rt-mbms-modem] build error in MeasurementFileWriter.cpp (Issue #29)
@jonniebeebhttps://github.com/jonniebeeb Can we close this issue?
— Reply to this email directly, view it on GitHubhttps://github.com/5G-MAG/rt-mbms-modem/issues/29#issuecomment-1354459591, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AR6UT6U7QN5HVVE5IMD75RLWNQZYRANCNFSM5PK2SNTQ. You are receiving this because you were mentioned.Message ID: @.***>
Describe the bug
I get an error when building rt-mbms-modem in MeasurementFileWriter.cpp
error is
MeasurementFileWriter.cpp:84:57: error: member reference base type 'timestamp_t' (aka 'double') is not a structure or union [clang-diagnostic-error] struct tm ts = localtime(&_gps_data->fix.time.tv_sec); ^ ..../src/MeasurementFileWriter.cpp: In member function ‘void MeasurementFileWriter::ReadGps()’: ..../src/MeasurementFileWriter.cpp:84:58: error: request for member ‘tv_sec’ in ‘((MeasurementFileWriter)this)->MeasurementFileWriter::_gps_data->gps_data_t::fix.gps_fix_t::time’, which is of non-class type ‘timestamp_t {aka double}’ struct tm ts = *localtime(&_gps_data->fix.time.tv_sec);
the problem seems to be with this line
struct tm ts = *localtime(&_gps_data->fix.time.tv_sec);
I can fix the error if I change the line to
struct tm ts = *localtime( (time_t*) &_gps_data->fix.time);
I am using Ubuntu 18.04.6 LTS