We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2413 - Fix for the undefined reference... Tiff4 errors when compiling everything as static.
Summary: Fix for the undefined reference... Tiff4 errors when compiling everything as ...
Status: RESOLVED FIXED
Alias: None
Product: SDL_image
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86 Windows 7
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-22 18:41 UTC by Sandu Liviu Catalin
Modified: 2014-02-23 16:43 UTC (History)
0 users

See Also:


Attachments
IMG_tif.c file patch (1.56 KB, patch)
2014-02-22 18:41 UTC, Sandu Liviu Catalin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sandu Liviu Catalin 2014-02-22 18:41:24 UTC
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.
Comment 1 Sam Lantinga 2014-02-23 01:20:18 UTC
It looks like these functions are supposed to be provided with libtiff. Can you see if they're in another library on the system?
Comment 2 Sandu Liviu Catalin 2014-02-23 16:43:51 UTC
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.