Project

General

Profile

question about compile flags

Added by lukasz lukiasz over 11 years ago

Hi

Im new C++ programmer. I've got question how to compile Exiv2 examples under linux? which flags I should use to compile it? I added flag -lexiv2 but it does not work - got a lot of errors:

/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libexiv2.a(pngchunk.o)||In function `Exiv2::Internal::PngChunk::zlibUncompress(unsigned char const*, unsigned int, Exiv2::DataBuf&)':|
(.text+0x79)||undefined reference to `uncompress'|
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libexiv2.a(pngchunk.o)||In function `Exiv2::Internal::PngChunk::zlibCompress(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':|
(.text+0x2e6)||undefined reference to `compress2'|
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libexiv2.a(pngchunk.o)||In function `Exiv2::Internal::PngChunk::makeAsciiTxtChunk(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)':|
(.text+0xc59)||undefined reference to `crc32'|

Thanks!


Replies (1)

RE: question about compile flags - Added by Andreas Huggel over 11 years ago

See the README, samples/Makefile and the output of "make samples". It is recommended to use the pkg-config utility to help you get the right options for your environment and exiv2 configuration. (The errors in your example are probably caused by a missing -lz.)

Andreas

    (1-1/1)