windows librarys are forcing a link to ..\..\..\zlib-1.2.3\projects\visual6\blah\blah
Thanks very much to Peter E from The American Museum of Natural History, New York for reporting the following issue:
| I followed your build instructions and everything went smoothly. | | The problem is when I try to link to the resulting exiv2 lib, | | the linker will fail with a message saying that it cannot find | | | | ..\..\..\zlib-1.2.3\projects\visualc6\blah\blah |
1) #define HAVE_LIBZ 1 in src/exv_msvc.h
2) delete the directory msvc/include (this will be recopied when you build exiv2lib)
3) rebuild all
When you enable zlib support using HAVE_LIBZ, you will include the #pragma comment(lib,".....") statements into your build.
This is fine for building the exiv2 family of libraries and executables, because it implies that you can build with/without zlib without having to change the project files. Very convenient for me. Very inconvenient for Peter.
The solution (for 0.18.1)
1) exv_msvc.h now lives in exiv2\msvc\include
and is not copied during the build process.
So, there's only one copy of exv_msvc.h which you can edit!
2) exv_msvc.h no longer includes #pragma comment statements
3) all progam project files (exiv2.vcproj etc) have been updated to explitly link the appropriate zlib library
The correct linkage is:
#621: Windows build environment changes
1) exv_msvc.h moved to msvc/include/exv_msvc.h
2) exv_msvc.h no longer has #pragma comment statements to link zlib
3) project files updated to explicitly link appropriate zlib library
#621 : Windows build changes.
I discovered while doing a private build for a user that msvc/include/exv_msvc.h still contains the #pragma comment code.
I've removed that (again!) and fixed a consequential link error on exiv2lib.vcproj DebugDLL | ReleaseDLL
Rebuilt everything on VS2003/5/8 and all run the runner.bat test OK.