Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-f.b-one.net (mx-f.one.com [91.198.169.53])
	by mail9.b-one.net (Postfix) with ESMTP id D7C6D40080A
	for <info@awaresystems.be>; Thu, 18 Feb 2010 17:40:47 +0100 (CET)
Received: by mx-f.b-one.net (Postfix, from userid 106)
	id BCDDFC02E9EE; Thu, 18 Feb 2010 17:40:47 +0100 (CET)
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-f.b-one.net (Postfix) with ESMTP id C7E95B916266 for
 <info@awaresystems.be>; Thu, 18 Feb 2010 17:24:43 +0100 (CET)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id 5312D1D233815; Thu, 18 Feb 2010
 11:23:24 -0500 (EST)
Received: from mail.sidefx.com (mail.sidefx.com [38.99.137.163]) by
 lists.maptools.org (Postfix) with ESMTP id 2F5261D5B67CC for
 <tiff@lists.maptools.org>; Thu, 18 Feb 2010 10:59:15 -0500 (EST)
Message-ID: <4B7D63D4.2050909@sidefx.com>
Date: Thu, 18 Feb 2010 10:59:16 -0500
From: Edward Lam <edward@sidefx.com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: Olivier Paquet <olivier@3delight.com>
References: <BAY128-W274F37D0CF5213A6E728EAF14A0@phx.gbl>
 <4B7AA6D8.7030806@3delight.com>	<BAY128-W2871B6605E984F07C5072AF1490@phx.gbl>
 <alpine.GSO.2.01.1002161107180.25017@freddy.simplesystems.org>
 <83C70DA01D8A4843AEFA5803F96EB4D4@KAM1720>
 <522c6461002161343v2042ab37l753fca7a860a7e00@mail.gmail.com>
 <4B7D562C.507@3delight.com>
In-Reply-To: <4B7D562C.507@3delight.com>
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] OT: Visual C++ runtimes (was: Using libtiff in Visual C++
 6.0)
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="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

Olivier Paquet wrote:
>> So ... versions of MSVC later than 6.0 will be unable to link against
>> the libtiff DLLs.
> 
> But this not quite. It would be true for a static library (because then 
> there is only one runtime) but you can very well use several DLLs which 
> themselves use different C++ or C runtimes in the same application. You 
> just need to avoid doing malloc() of memory in one DLL and free() of it 
> in another (which is bad design anyway).

It's a bit more complicated than that. In general, any structs you 
create with one runtime can't be safely used with a different runtime. 
For example, FILE * objects created with one runtime can't be used with 
another. We ran into this case when we had (accidentally) compiled 
libraries with both VC71 and VC8 runtimes. Another thing to be aware of 
is that at some point (I forget when now, VC8?), time_t changed from 
32-bits to 64-bits so any functions that either directly (or indirectly) 
use time_t can't go across the runtimes either.

Regards,
-Edward
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
