Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-q.b-one.net (mx-q.one.com [91.198.169.248])
	by mail9.b-one.net (Postfix) with ESMTP id A2904400B7B
	for <info@awaresystems.be>; Mon,  3 May 2010 00:22:07 +0200 (CEST)
Received: by mx-q.b-one.net (Postfix, from userid 106)
	id 99A9DC92C0B8; Mon,  3 May 2010 00:22:07 +0200 (CEST)
X-Virus-Scanned: by one.com
X-Spam-Score: 0
X-Spam-Level: 
X-Spam-Status: No, score=0 tagged_above=0 required=4 tests=[none]
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144]) by
 mx-q.b-one.net (Postfix) with ESMTP id 52EB4C92C0B8 for
 <info@awaresystems.be>; Mon,  3 May 2010 00:22:06 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id 72BF01D0E529A; Sun,  2 May 2010
 17:20:46 -0500 (EST)
Received: from mail-pv0-f172.google.com (mail-pv0-f172.google.com
 [74.125.83.172]) by lists.maptools.org (Postfix) with ESMTP id 13CEB1CF6CCF6
 for <tiff@lists.maptools.org>; Sun,  2 May 2010 16:48:27 -0500 (EST)
Received: by pvg2 with SMTP id 2so144329pvg.3 for <tiff@lists.maptools.org>;
 Sun, 02 May 2010 14:48:26 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.143.25.27 with SMTP id c27mr939905wfj.65.1272836906195; Sun, 
 02 May 2010 14:48:26 -0700 (PDT)
Received: by 10.143.163.20 with HTTP; Sun, 2 May 2010 14:48:26 -0700 (PDT)
In-Reply-To: <q2yc2fdd35e1005011854m3f7b7774x31927fa9e8caf20@mail.gmail.com>
References: <q2yc2fdd35e1005011854m3f7b7774x31927fa9e8caf20@mail.gmail.com>
Date: Sun, 2 May 2010 14:48:26 -0700
X-Google-Sender-Auth: 279740f4c857859a
Message-ID: <v2k121b97401005021448udd8c9deckefd61698deefb27f@mail.gmail.com>
From: Dmitry Fedorov <dima@dimin.net>
To: Dave Sun <hotdog.sun@gmail.com>
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] qmake (Qt) and libtiff "undefined symbols" problem on mac
 (snow leopard).
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

Hi Dave,

If you installed Qt from the binary package from the official website
it comes in a 32 bit form as of a latest build. If you got a default
libtiff for your mac it should be 64 bit and thus different
architectures. The best idea there would be to rebuild qt for snow
leopard and cocoa (will take you an hour). Another problem might arise
if you did build Qt yourself as a universal binary, in this case you
would need to supply libtiff as a universal binary as well.

Dmitry


On Sat, May 1, 2010 at 6:54 PM, Dave Sun <hotdog.sun@gmail.com> wrote:
> Dear folks,
> I have problems using qmake to compile my simplest libtiff program. Here =
are
> the information about my system.
> computer: =A0Darwin Darwin Kernel Version 10.2.0: Tue Nov =A03 10:37:10 P=
ST
> 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386
> Qt version: Qt 4.6.2
> libtiff version: 3.9.2
> operating system: snow leopard.
> Simplest program:
> #include <QtCore/QCoreApplication>
> #include "tiff.h"
> #include "tiffio.h"
> #include <iostream>
> int main(int argc, char *argv[])
> {
> =A0=A0 =A0//QCoreApplication a(argc, argv);
> =A0=A0 =A0TIFF* tif =3D TIFFOpen("foo.tif", "r");
> =A0=A0 =A0if(tif =3D=3D NULL)
> =A0=A0 =A0 =A0 std::cout << "could not open the file";
> =A0=A0 =A0TIFFClose(tif);
> =A0=A0 =A0//return a.exec();
> std::cout << "hello";
> =A0=A0 =A0return 0;
> }
> my pro file:
> QT =A0 =A0 =A0 -=3D gui
> TARGET =3D libtiffSimpleTest
> CONFIG =A0 +=3D console
> CONFIG =A0 -=3D app_bundle
> TEMPLATE =3D app
> LIBS +=3D -ltiff
> SOURCES +=3D main.cpp
> I used Qt creator as my IDE. When I run compiling program I got the
> following error:
>
> ld: warning: in /usr/local/lib/libtiff.dylib, file is not of required
> architecture
>
> Undefined symbols:
>
> "_TIFFOpen", referenced from:
>
> _main in main.o
>
> ld: symbol(s) not found
>
> collect2: ld returned 1 exit status
>
> make: *** [libtiffSimpleTest] Error 1
>
> However, when I just use the following:
>
> g++ main.cpp -ltiff
>
> It works well. What is the problem here?
>
> Thank you.
>
> Dave
>
> _______________________________________________
> Tiff mailing list: Tiff@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tiff
> http://www.remotesensing.org/libtiff/
>



-- =

__________________________________

Dmitry Fedorov Levit
  <dima@dimin.net> <http://www.dimin.net/>
Skype: dima_fedorov
Google: fedorov
__________________________________

Center for Bio-Image Informatics:
  <http://www.bioimage.ucsb.edu/>

Vision Research Lab, Electrical and Computer Engineering
Image Registration:
  <http://vision.ece.ucsb.edu/>
  <http://vision.ece.ucsb.edu/registration/demo/>
  <http://regima.dpi.inpe.br/>

University of California, Santa Barbara
_________________________________

DIMIN Viewer n5:
  <http://www.dimin.net/software/viewer/>
__________________________________
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
