AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
February 2012

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2012.02.01 17:41 "linking libtiff in ubuntu", by Martin Alegre
2012.02.01 18:23 "Re: linking libtiff in ubuntu", by Frank Warmerdam
2012.02.01 18:49 "Re: linking libtiff in ubuntu", by <christopher.schmidt@nokia.com>
2012.02.01 20:06 "Re: linking libtiff in ubuntu", by Jay Berkenbilt
2012.02.02 01:23 "Re: linking libtiff in ubuntu", by <pullmoll@t-online.de>

2012.02.01 20:06 "Re: linking libtiff in ubuntu", by Jay Berkenbilt

[sorry if this is a duplicate...I think I accidentally bcc'ed the list
last time...]

Correct.  Also, be sure you are linking with -ltiff, not -llibtiff.  If
you wanted to know which tiff-related packages you had installed, you
could run

dpkg --list '*tiff*'

since all the tiff library packages contain the word tiff in them.  This
isn't necessarily 100% reliable in the general case, but it would work here.



On 02/01/2012 01:49 PM, christopher.schmidt@nokia.com wrote:
> Note that apt-cache search is searching the packages you *could* install,
> not the packages that *are* installed. dpkg is the tool that shows
> what you have. In this case, it seems like perhaps you need to 
> 'apt-get install libtiff4-dev' to get the development libraries on your
> system...
>
> -- Chris
>
> On Feb 1, 2012, at 1:23 PM, ext Frank Warmerdam wrote:
>
>> On Wed, Feb 1, 2012 at 9:41 AM, Martin Alegre <tin.alegre@gmail.com> wrote:
>>> Dear all,
>>>
>>> I'm wondering, which is the correct way to link the libtiff library in
>>> ubuntu? I'm using g++ 4.6.0 on Ubuntu 11.04 and running the command below to
>>> build the executable:
>>> g++ -ggdb -ansi -std=c++0x -llibtiff ./src/color.cpp  -I./inc -o
>>> ./obj/color.o
>>>
>> Martin,
>>
>> On my system I see:
>>
>> warmerdam@gdal:~$ apt-cache search libtiff
>> pngtools - series of tools for PNG (Portable Network Graphics) images
>> libtiff-doc - TIFF manipulation and conversion documentation
>> libtiff-tools - TIFF manipulation and conversion tools
>> libtiff4 - Tag Image File Format (TIFF) library
>> libtiff4-dev - Tag Image File Format library (TIFF), development files
>> libtiffxx0c2 - Tag Image File Format (TIFF) library -- C++ interface
>> libtiff-opengl - TIFF manipulation and conversion tools
>> warmerdam@gdal:~$ ls -l /usr/include/tiffio.h
>> -rw-r--r-- 1 root root 20428 2011-04-20 10:42 /usr/include/tiffio.h
>>
>> warmerdam@gdal:~$ cat test1.c
>> #include <tiffio.h>
>>
>> int main(int argc, char **argv)
>>
>> {
>> 	TIFF *h = TIFFOpen("utm.tif","r");
>> }
>> warmerdam@gdal:~$ g++ test1.c -o test1 -ltiff
>>
>> So you shouldn't need to do anything special.  Of course you are
>> running into problems but I'm not sure why.  Do check if tiffio.h is
>> in /usr/include, /usr/include/libtiff or somewhere similar.
>>
>> Best regards,
>> -- 
>> ---------------------------------------+--------------------------------------
>> I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
>> light and sound - activate the windows | http://pobox.com/~warmerdam
>> and watch the world go round - Rush    | Geospatial Software Developer
>> _______________________________________________
>> Tiff mailing list: Tiff@lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/tiff
>> http://www.remotesensing.org/libtiff/
> _______________________________________________
> Tiff mailing list: Tiff@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tiff
> http://www.remotesensing.org/libtiff/
>