fix version.cpp to compile, link and run on linux

v0.27.3
Robin Mills 13 years ago
parent b42f6668cd
commit 2277b076a7

@ -153,7 +153,7 @@ COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
# LINK.cc does not need $(LIBS), libtool's dark magic takes care of that # LINK.cc does not need $(LIBS), libtool's dark magic takes care of that
# when linking a binary with a libtool library. # when linking a binary with a libtool library.
LINK.cc = $(CXX) $(LDFLAGS) LINK.cc = $(CXX) $(LDFLAGS) -ldl
# ********************************************************************** # **********************************************************************
# Installation programs # Installation programs

@ -68,6 +68,7 @@ namespace Exiv2 {
} // namespace Exiv2 } // namespace Exiv2
#include <stdio.h>
// platform specific support for dumpLibraryInfo // platform specific support for dumpLibraryInfo
#ifdef WIN32 #ifdef WIN32
@ -85,7 +86,7 @@ namespace Exiv2 {
#elif __APPLE__ #elif __APPLE__
# include <mach-o/dyld.h> # include <mach-o/dyld.h>
#else __LINUX__ #else __linux__
// http://syprog.blogspot.com/2011/12/listing-loaded-shared-objects-in-linux.html // http://syprog.blogspot.com/2011/12/listing-loaded-shared-objects-in-linux.html
# include "link.h" # include "link.h"
# include <dlfcn.h> # include <dlfcn.h>
@ -162,7 +163,7 @@ EXIV2API void dumpLibraryInfo(std::ostream& os)
} }
} }
#elif __LINUX__ #elif __linux__
bReport = true; bReport = true;
// http://syprog.blogspot.com/2011/12/listing-loaded-shared-objects-in-linux.html // http://syprog.blogspot.com/2011/12/listing-loaded-shared-objects-in-linux.html
struct lmap* pl; struct lmap* pl;

Loading…
Cancel
Save