From: David Balmain Date: 2006-09-20T23:02:31+09:00 Subject: Re: ruby-exiv2 (exif handling) On 9/20/06, 軈睦 豼俛瀕 wrote:> Hello. I want to introduce binding from ruby to exiv2 (http://> www.exiv2.org) library.> I know, that there are some other exif manipulation libraries, but> choice in this situation is good.>> Currently, it have abilities to read exif tags and write them back to> file.>> Project is already on rubyforge and possible to install via> gem install ruby-exiv2>> Examples of usage currently are only in tests, however, I will fill> README on request Hi 軈睦,Nice to see someone working on this. I'm looking forward to having alibrary that will read IPTC tags. Unfortunately I haven't done any C++programming so I can't help much. Anyway, I had a few problems installing. I'm on Ubuntu. gcc version4.0.3. Firstly I had to remove the following lines from extconf.rb: $CPPFLAGS << " -Wall -I/usr/local/include/exiv2 " $LDFLAGS << " -lstdc++ -L/usr/local/lib " Then I got this error: g++ -fPIC -Wall -g -O2 -fPIC -I. -I/usr/lib/ruby/1.8/i486-linux-I/usr/lib/ruby/1.8/i486-linux -I. -Wall -I/usr/include/exiv2 -cexif.cpp/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/stl_iterator.h:In constructor '__gnu_cxx::__normal_iterator<_Iterator,_Container>::__normal_iterator(const__gnu_cxx::__normal_iterator<_Iter, _Container>&) [with _Iter = constExiv2::Exifdatum*, _Iterator = Exiv2::Exifdatum*, _Container =std::vector >]':exif.cpp:86: instantiated from here/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/stl_iterator.h:609:error: invalid conversion from 'const Exiv2::Exifdatum* const' to'Exiv2::Exifdatum*' So I changed line 80 of exif.cpp from: Exiv2::ExifData::const_iterator pos = exifData.findKey(exifKey); to: Exiv2::ExifData::iterator pos = exifData.findKey(exifKey); That got me past there. Then I got the error: g++: '-b' must come at the start of the command line So I swapped '-bundle' for '-shared' and removed '-undefined suppress'as that wasn't working either. Finally I got it to compile. Now when Itry to load in IRB I get: irb(main):001:0> require 'exiv2'LoadError: no such file to load -- intersys from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in`require__' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in`require' from /usr/local/lib/site_ruby/1.8/rubygems.rb:182:in `activate' from /usr/local/lib/site_ruby/1.8/rubygems.rb:181:in `activate' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:26:in`require' from (irb):1 I'm not sure how much help any of this is. I'm looking forward to thislibrary maturing. Keep up the great work! :-) Cheers,Dave