| Summary: | Fix for the undefined reference... Tiff4 errors when compiling everything as static. | ||
|---|---|---|---|
| Product: | SDL_image | Reporter: | Sandu Liviu Catalin <slc.universe> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Windows 7 | ||
| Attachments: | IMG_tif.c file patch | ||
It looks like these functions are supposed to be provided with libtiff. Can you see if they're in another library on the system? After some manual searching though the LibTiff4 library files I found some info in the Changelog file and apparently there is libtiff/tif_{unix,vms,win32}.c that has them implemented but the file wasn't included in my Code::Blocks project.
|
Created attachment 1571 [details] IMG_tif.c file patch Compiling every external library (zlib, libpng, libjpeg, libtiff4 and libwebp) and SDL_image as static libraries and then linking them to an executable project with Code::Blocks and MinGW (4.8.2 x86) fails to compile because of the LibTiff4 library which gives a couple of undefined reference errors for _TIFFmalloc, _TIFFrealloc, _TIFFerrorHandler etc. Tested on clean SDL_image clone from the repository. A temporary workaround for this problem was attached (part of the code was taken from FreeImage). The fix allows SDL_image to be compiled with static versions of LibTiff4 library.