dfandrich / gpscorrelate

C program to match GPS tracks to photographs, and store the matches in the EXIF data in the photographs.
https://dfandrich.github.io/gpscorrelate/
GNU General Public License v2.0
28 stars 8 forks source link

Fixed build with exiv2-0.27.1 #4

Closed sikmir closed 5 years ago

sikmir commented 5 years ago
$ make CFLAGS=-DENABLE_NLS GTK=3
...
exif-gps.cpp: In function 'char* ReadExifDate(const char*, int*)':
exif-gps.cpp:103:18: error: 'Error' in namespace 'Exiv2' does not name a type
  } catch (Exiv2::Error& e) {
                  ^~~~~
exif-gps.cpp: In function 'char* ReadExifData(const char*, double*, double*, double*, int*)':
exif-gps.cpp:160:18: error: 'Error' in namespace 'Exiv2' does not name a type
  } catch (Exiv2::Error& e) {
                  ^~~~~
exif-gps.cpp: In function 'char* ReadGPSTimestamp(const char*, char*, char*, int*)':
exif-gps.cpp:298:18: error: 'Error' in namespace 'Exiv2' does not name a type
  } catch (Exiv2::Error& e) {
                  ^~~~~
exif-gps.cpp: In function 'int WriteGPSData(const char*, const GPSPoint*, const char*, int, int)':
exif-gps.cpp:469:18: error: 'Error' in namespace 'Exiv2' does not name a type
  } catch (Exiv2::Error& e) {
                  ^~~~~
exif-gps.cpp:619:18: error: 'Error' in namespace 'Exiv2' does not name a type
  } catch (Exiv2::Error& e) {
                  ^~~~~
exif-gps.cpp: In function 'int WriteFixedDatestamp(const char*, time_t)':
exif-gps.cpp:649:18: error: 'Error' in namespace 'Exiv2' does not name a type
  } catch (Exiv2::Error& e) {
                  ^~~~~
exif-gps.cpp:684:18: error: 'Error' in namespace 'Exiv2' does not name a type
  } catch (Exiv2::Error& e) {
                  ^~~~~
exif-gps.cpp: In function 'int RemoveGPSExif(const char*, int, int)':
exif-gps.cpp:711:18: error: 'Error' in namespace 'Exiv2' does not name a type
  } catch (Exiv2::Error& e) {
                  ^~~~~
exif-gps.cpp:737:19: error: 'Error' in namespace 'Exiv2' does not name a type
   } catch (Exiv2::Error& e) {
                   ^~~~~
make: *** [Makefile:53: exif-gps.o] Error 1
coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 208


Totals Coverage Status
Change from base Build 206: 0.0%
Covered Lines: 893
Relevant Lines: 938

💛 - Coveralls
dfandrich commented 5 years ago

Do you know if this also works for earlier exiv2 versions?

sikmir commented 5 years ago

Yes, it works. I've tested with exiv2-0.25.

dfandrich commented 5 years ago

I just tried it on exiv2 0.18 and it didn't work (it doesn't supply exiv2.hpp). Since this version is still supported in RHEL6 for at least another year, and since gpscorrelate doesn't depend on anything in newer versions, it would be nice if it could remain compatible. Can you find a way to make it work? Maybe by including error.hpp instead (that still works on 0.18)?

sikmir commented 5 years ago

Can you find a way to make it work? Maybe by including error.hpp instead (that still works on 0.18)?

OK, updated.

dfandrich commented 5 years ago

Thanks!