Project

General

Profile

Bug #410

config.h must be installed

Added by Andreas Huggel almost 17 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
Normal
Category:
build
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Just today I started programming using the library. Before I started, I
naturally built and installed the library.

To cut a really long story short, when I tried to build a program including
exif.hpp, it did not work. g++ spat out heaps of errors and then gave up.
However, when your Makefile built the program in the first place, it was fine.

After some investigation, it became clear that types.hpp, included by
exif.hpp, calls up a "config.h" in the root of where the exiv .tar.gz was
unpacked and ./configure'd. (In my case, /home/daniel/Incoming/exiv).

It also requires "HAVE_CONFIG_H" to be defined to even include the file. If
you do not include the file, then g++ dies with lots of errors (mostly syntax
errors).

Basically: the library relies on this config.h, but it is not installed with
the rest of the library header files.

(Reported by Daniel Foote)

Additional information:

To fix this, I copied config.h to /usr/local/include, renamed it to
"exivconfig.h", and modified types.hpp to always include this file. This saves
the need to compile my program with -DHAVE_CONFIG_H, and, allows it to compile
at all.

For you to reproduce the output of g++, simply try to compile one of your
utilities. Change into the "src" directory, and then type:

g++ -I. -lexiv2 -o metacopy metacopy.cpp

And it will momentarily die. To "fix" it temporarily change the line to:

g++ -I. -I.. -lexiv2 -DHAVE_CONFIG_H -o metacopy metacopy.cpp

Like I say, I've hacked my install up so that it works and I can get on
writing my program. But I thought you would like to know about this.

(Workaround by Daniel Foote)


Related issues

Related to Exiv2 - Bug #420: Defines should have a library specific prefix, like e.g., EXV_HAVE_CONFIG_HClosed

Actions

History

#1

Updated by Andreas Huggel almost 17 years ago

r503 (part 1, branches/Exiv2-0_6_041212)
r514 (part 1, trunk)
r515 (part 2, branches/Exiv2-0_6_041212)
r534 (part 2, trunk)

#2

Updated by Andreas Huggel over 16 years ago

In addition, defines should have a library specific prefix, like e.g., EXV_HAVE_CONFIG_H

http://lists.gnu.org/archive/html/autoconf/2002-03/msg00115.html

#3

Updated by Andreas Huggel over 16 years ago

Not yet fixed: Defines should have a library specific prefix, like e.g., EXV_HAVE_CONFIG_H

See Bug #0000420

Also available in: Atom PDF