Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-n.b-one.net (mx-n.one.com [91.198.169.61])
	by mail9.b-one.net (Postfix) with ESMTP id 20FA4400107
	for <info@awaresystems.be>; Tue,  3 Mar 2009 21:59:01 +0100 (CET)
X-Virus-Scanned: by one.com
X-Spam-Score: 0.001
X-Spam-Level: 
X-Spam-Status: No, score=0.001 tagged_above=0 required=6
	tests=[HTML_MESSAGE=0.001]
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144])
	by mx-n.b-one.net (Postfix) with ESMTP id 480DA8C68DE
	for <info@awaresystems.be>; Tue,  3 Mar 2009 21:59:00 +0100 (CET)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 99A951D18DE7B;
	Tue,  3 Mar 2009 15:56:24 -0500 (EST)
Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30])
	by lists.maptools.org (Postfix) with ESMTP id C4F551D38CD1E
	for <tiff@lists.maptools.org>; Tue,  3 Mar 2009 15:51:19 -0500 (EST)
Received: by yw-out-2324.google.com with SMTP id 2so7059425ywt.9
	for <tiff@lists.maptools.org>; Tue, 03 Mar 2009 12:51:18 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.101.17 with SMTP id y17mr178186agb.32.1236113475283; Tue, 
	03 Mar 2009 12:51:15 -0800 (PST)
Date: Tue, 3 Mar 2009 15:51:15 -0500
Message-ID: <30309f9e0903031251u3d10aae8hfe2cc606ce48a15e@mail.gmail.com>
From: Steven Lehar <slehar@gmail.com>
To: tiff@lists.maptools.org
Subject: [Tiff] Building Libtiff in Visual Studio under Windows?
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: multipart/mixed; boundary="===============1815958845=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

--===============1815958845==
Content-Type: multipart/alternative; boundary=001636163d1998aabe04643d184c

--001636163d1998aabe04643d184c
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hi,

I'm having trouble building Libtiff in Windows, both on a win32 XP machine,
and also on a 64-bit Vista machine. I have the same problem on both
machines. Maybe I'm making a simple mistake. Can somebody help me?

I downloaded the Windoz binaries from
http://gnuwin32.sourceforge.net/packages/tiff.htm (maybe this is the problem
for my 64-bit Vista machine, although it SHOULD work, but thats why I tried
again with my win32 XP machine) and installed it at

C:\Program Files (x86)\GnuWin32

I opened a new Win32 Console Application project named "TestTiff".

Under Header Files, in stdafx.h I added the line:

    #include "tiffio.h"

In Project > Properties > C/C++ > Additional Include Directories I added

    "C:\Program Files (x86)\GnuWin32\include"

In Project > Properties > Linker > Additional Library Dependencies I added

    "C:\Program Files\GnuWin32\lib

Then in TestTiff.cpp after int _tmain(int argc, _TCHAR* argv[]){ I added

    // Open Tif Image
    TIFF* tifImg = TIFFOpen("TestImage.tif", "r");

(making sure to have a "TestImage.tif" in the local folder). But when I
tried to build, I got:

Linking...
LINK: Fatal error LNK1104: Cannot open file 'C:\Program Files
(x86)\GnuWin32\lib\libtiff.lib;'

This was all on the Vista 64 machine (the "Program Files (x86)" folder is
for 32-bit programs)

When I did exactly the same sequence on my Win32 XP machine, and tried to
build, I got:

error LNK2019: unresolved external symbol __imp__TIFFOpen referenced in
function _wmain.
fatal error LNK1120: 1 unresolved externals.

What am I doing wrong?

--001636163d1998aabe04643d184c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>Hi,</div>
<div>=A0</div>
<div>I&#39;m having trouble building Libtiff in Windows, both on a win32 XP=
 machine, and also on a 64-bit Vista machine. I have the same problem on bo=
th machines. Maybe I&#39;m making a simple mistake. Can somebody help me?</=
div>

<div>=A0</div>
<div>I downloaded the Windoz binaries from <a href=3D"http://gnuwin32.sourc=
eforge.net/packages/tiff.htm">http://gnuwin32.sourceforge.net/packages/tiff=
.htm</a>=A0(maybe this is the problem for my 64-bit Vista machine, although=
 it SHOULD work, but thats why I tried again with my win32 XP machine) and =
installed it at</div>

<div>=A0</div>
<div>C:\Program Files (x86)\GnuWin32</div>
<div>=A0</div>
<div>I opened a new Win32 Console Application project named &quot;TestTiff&=
quot;.</div>
<div>=A0</div>
<div>Under Header Files, in stdafx.h I added the line:</div>
<div>=A0</div>
<div>=A0=A0=A0 #include &quot;tiffio.h&quot;</div>
<div>=A0</div>
<div>In Project &gt; Properties &gt; C/C++ &gt; Additional Include Director=
ies I added</div>
<div>=A0</div>
<div>=A0=A0=A0 &quot;C:\Program Files (x86)\GnuWin32\include&quot;</div>
<div>=A0</div>
<div>In Project &gt; Properties &gt; Linker &gt; Additional Library Depende=
ncies I added</div>
<div>=A0</div>
<div>=A0=A0=A0 &quot;C:\Program Files\GnuWin32\lib</div>
<div>=A0</div>
<div>Then in TestTiff.cpp after int _tmain(int argc, _TCHAR* argv[]){ I add=
ed</div>
<div>=A0</div>
<div>=A0=A0=A0 // Open Tif Image</div>
<div>=A0=A0=A0 TIFF* tifImg =3D TIFFOpen(&quot;TestImage.tif&quot;, &quot;r=
&quot;);</div>
<div>=A0</div>
<div>(making sure to have a &quot;TestImage.tif&quot; in the local folder).=
 But when I tried to build, I got:</div>
<div>=A0</div>
<div>Linking...</div>
<div>LINK: Fatal error LNK1104: Cannot open file &#39;C:\Program Files (x86=
)\GnuWin32\lib\libtiff.lib;&#39;</div>
<div>=A0</div>
<div>This was all on the Vista 64 machine (the &quot;Program Files (x86)&qu=
ot; folder is for 32-bit programs)</div>
<div>=A0</div>
<div>When I did exactly the same sequence on my Win32 XP machine, and tried=
 to build, I got:</div>
<div>=A0</div>
<div>error LNK2019: unresolved external symbol __imp__TIFFOpen referenced i=
n function _wmain.</div>
<div>fatal error LNK1120: 1 unresolved externals.</div>
<div>=A0</div>
<div>What am I doing wrong?</div>
<div>=A0</div>
<div>=A0</div>
<div>=A0</div>
<div>=A0</div>
<div>=A0</div>
<div>=A0</div>
<div>=A0</div>
<div>=A0</div>
<div>=A0</div>
<div>=A0</div>
<div>=A0</div>
<div>=A0</div>
<div>=A0</div>
<div>=A0</div>

--001636163d1998aabe04643d184c--

--===============1815958845==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
--===============1815958845==--
