Bug #509

Version check macro doesn't work in a precompiler #if test anymore

Added by Andreas Huggel almost 12 years ago. Updated about 10 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Andreas Huggel% Done:


Target version:0.15


Before v0.14 this was valid


In 0.14 this use of the macro is no longer valid.

Additional information:

Workaround: Add code like this to the application to define a EXIV2_TEST_VERSION macro which can be used in a preprocessor test with all versions of exiv2, instead of EXIV2_CHECK_VERSION:

#include <exiv2/types.hpp>
  1. ifndef EXIV2_TEST_VERSION
  2. define EXIV2_TEST_VERSION(major,minor,patch) \
    ( EXIV2_VERSION >= EXIV2_MAKE_VERSION(major,minor,patch) )
  3. endif
  4. define EXIV2_TEST_VERSION(major,minor,patch) (false)

Associated revisions

Revision 1121
Added by Andreas Huggel over 11 years ago

Added new function testVersion() and macro EXIV2_TEST_VERSION. Fixes #509.


Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux