On 9/20/06, íÁËÓ ìÁÐÛÉÎ [email protected] wrote:
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 a
library 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 version
4.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 -c
exif.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 = const
Exiv2::Exifdatum*, _Iterator = Exiv2::Exifdatum*, _Container =
std::vector<Exiv2::Exifdatum, std::allocatorExiv2::Exifdatum >]’:
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 I
try 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 this
library maturing. Keep up the great work!
Cheers,
Dave