Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
X-Original-To: filtered@awaresystems.be
Delivered-To: filtered@awaresystems.be
Received: from mx-q.one.com (mx-q.one.com [91.198.169.248])
	by mail9.b-one.net (Postfix) with ESMTP id CD880401F08
	for <filtered@awaresystems.be>; Wed,  1 Feb 2012 19:43:23 +0100 (CET)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx-q: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.210.41 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-pz0-f41.google.com (mail-pz0-f41.google.com [209.85.210.41])
	by mx-q.one.com (Postfix) with ESMTP id 3B8A060FA53
	for <filtered@awaresystems.be>; Wed,  1 Feb 2012 18:43:23 +0000 (UTC)
Received: by dadv6 with SMTP id v6so1306299dad.0
        for <filtered@awaresystems.be>; Wed, 01 Feb 2012 10:43:22 -0800 (PST)
Received: by 10.68.232.103 with SMTP id tn7mr61290061pbc.74.1328121800448;
        Wed, 01 Feb 2012 10:43:20 -0800 (PST)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.142.51.2 with SMTP id y2cs292249wfy;
        Wed, 1 Feb 2012 10:43:19 -0800 (PST)
Received: by 10.68.227.195 with SMTP id sc3mr9117697pbc.47.1328121798776;
        Wed, 01 Feb 2012 10:43:18 -0800 (PST)
Received-SPF: softfail (google.com: best guess record for domain of transitioning tiff-bounces@lists.maptools.org does not designate 91.198.169.249 as permitted sender) client-ip=91.198.169.249;
Received: by 10.68.18.107 with POP3 id v11mf825993pbd.10;
        Wed, 01 Feb 2012 10:43:18 -0800 (PST)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-r.one.com (mx-r.one.com [91.198.169.249])
	by mail9.b-one.net (Postfix) with ESMTP id 27028401F08
	for <info@awaresystems.be>; Wed,  1 Feb 2012 19:42:13 +0100 (CET)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144])
	by mx-r.one.com (Postfix) with ESMTP id C16DB81328E
	for <info@awaresystems.be>; Wed,  1 Feb 2012 18:42:12 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id D632E1EDAAF;
	Wed,  1 Feb 2012 13:41:06 -0500 (EST)
Received: from mail-ey0-f172.google.com (mail-ey0-f172.google.com
	[209.85.215.172])
	by lists.maptools.org (Postfix) with ESMTPS id 1247E1EDAAF
	for <tiff@lists.maptools.org>; Wed,  1 Feb 2012 13:23:38 -0500 (EST)
Received: by eaae12 with SMTP id e12so1012489eaa.3
	for <tiff@lists.maptools.org>; Wed, 01 Feb 2012 10:23:37 -0800 (PST)
MIME-Version: 1.0
Received: by 10.213.17.144 with SMTP id s16mr1279405eba.38.1328120617448; Wed,
	01 Feb 2012 10:23:37 -0800 (PST)
Received: by 10.213.22.6 with HTTP; Wed, 1 Feb 2012 10:23:37 -0800 (PST)
In-Reply-To: <CAPKW8o3hKn9JXjMTBYU-+WhzEQ62OEYzTh51Pg4BayQODJFT-w@mail.gmail.com>
References: <CAPKW8o3hKn9JXjMTBYU-+WhzEQ62OEYzTh51Pg4BayQODJFT-w@mail.gmail.com>
Date: Wed, 1 Feb 2012 10:23:37 -0800
X-Google-Sender-Auth: c4WYEouzEt_DD3nlb5rzorMFh4Y
Message-ID: <CA+YzLBfgFMMq-C2n9Uo2aOMPZzbp-LozbCutftSThdmESx3GtA@mail.gmail.com>
From: Frank Warmerdam <warmerdam@pobox.com>
To: Martin Alegre <tin.alegre@gmail.com>
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] linking libtiff in ubuntu
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

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=3Dc++0x -llibtiff ./src/color.cpp=A0 -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 =3D 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=A0=A0 | Frank Warmerdam, warmerdam@pob=
ox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush=A0 =A0 | Geospatial Software Developer
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
