Re: Fwd: Question about openEXR-1.6.1

"Okubo hiroyuki" <[email protected]> Mon, 22 Sep 2008 10:14:11 -0700
Newsgroups gmane.comp.video.openexr.user
Message-ID <[email protected]>
Hi, Ger.
ok. So, I compiled those each project as static lib
and got rid of those OPENEXR_DLL.
Now, It worked finally!!
Thank you very much for your step by step detailed explanation.
I really appreciate it.

Hiro


>From: "Ger Hobbelt" <[email protected]>
>To: "Okubo hiroyuki" <[email protected]>
>CC: [email protected]
>Subject: Re: [Openexr-user] Fwd: Question about openEXR-1.6.1
>Date: Sat, 20 Sep 2008 02:37:19 +0200
>MIME-Version: 1.0
>Received: from rv-out-0506.google.com ([209.85.198.232]) by 
bay0-mc6-f14.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Fri, 
19 Sep 2008 17:37:19 -0700
>Received: by rv-out-0506.google.com with SMTP id k40so561599rvb.15        
for <[email protected]>; Fri, 19 Sep 2008 17:37:19 -0700 (PDT)
>Received: by 10.141.168.2 with SMTP id v2mr423091rvo.55.1221871039909;     
   Fri, 19 Sep 2008 17:37:19 -0700 (PDT)
>Received: by 10.141.83.21 with HTTP; Fri, 19 Sep 2008 17:37:19 -0700 (PDT)
>X-Message-Delivery: Vj0zLjQuMDt1cz0wO2w9MDthPTA=
>X-Message-Info: 
HKIYGN+H3D+QShLNGWNUtbIZQ7mAvyIIFfIz3QE+QYrrSbbPv2c8Ac/SLeeWvPR1GI4Yo+wJyGbDDF2VuGs6ykZHYf9xJkkZ

>DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; 
s=gamma;        
h=domainkey-signature:received:received:message-id:date:from:sender         
:to:subject:cc:in-reply-to:mime-version:content-type         
:content-transfer-encoding:content-disposition:references         
:x-google-sender-auth;        
bh=4pXEqbrSXAa8TEq0Zdk0lv7CWAC74LyhHfLdBhXNh0c=;        
b=Sm3GPV1m9/6jRGqyt2ySk6u02WLOqRVmXUnKg3FV4xM+FcyB+iPNKSRIcQvuXCTs95        
 d/l0dfr2cBqTO+MHeT6wJDoxTvPj6ROcepu1Dspv0Ddnpx/4Hcc7SdChaWcOU59ePzO0       
  rHEiZfIdgVOSAQupTWRV62Se++hRgoCC3LSM4=
>DomainKey-Signature: a=rsa-sha1; c=nofws;        d=gmail.com; s=gamma;     
   h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version     
    :content-type:content-transfer-encoding:content-disposition         
:references:x-google-sender-auth;        
b=JN3UvWdBBtV9DMZOs2/pzgK0W2BRNu2bXMWcShngy1IGpVH7nU2asaNweVHGxoddUp        
 M3B9g/4s6XLIQbg6Wtm0wuUnIBQdW6Lql3239kbduRJyZ4KSPdcad95wcC0jfNzQ4slo       
  Oeuk2cch7BPAOsjdZ6H6mnjXVdDIIjcELeRyw=
>References: <[email protected]>
>X-Google-Sender-Auth: d82d0ab0f75ae3b6
>Return-Path: [email protected]
>X-OriginalArrivalTime: 20 Sep 2008 00:37:19.0940 (UTC) 
FILETIME=[0A36B840:01C91AB9]
>
>On Fri, Sep 19, 2008 at 8:54 PM, Okubo hiroyuki <[email protected]> 
wrote:
> > Ok. I checked my shaders_p.dll with dependency walker.
> > It tells me that the dll requires all openEXR DLL such
> > as(IlmImf,Half,Iex,etc..)
> > So I put all those libs into C:\Program Files\Autodesk\Maya2008\bin 
folder..
>^^^ I'm sure you mean you copied the .dll files overthere ;-)
>No matter.
>
> > and It worked. I supposed that the shader was linked statically but it 
is
> > not...
> > So how do I  link statically...
> >>
> >>     answer: make sure OPENEXR_DLL is not defined in any of your 
projects
> >
> > but I am not sure where I can find this "OPENEXR_DLL" part.
> > Could some one give me more detail of it, please?
>
>Well, it's not just removing a #define'd symbol, but (for DLLs and all
>executables using those DLLs) it should be located in the OpenEXR
>projectsettings:
>in MSVC, right click on each of the projects, then select 'Properties'
>in the popup menu at the bottom, the in dialog open tree element:
>Configuration Properties -> C/C++ -> Preprocessor ---> item:
>Preprocessor Definitions
>which lists all #defines passed to the compiler as a comma separated
>list. For DLLs and executables using those (OpenEXR) DLLs,
>'OPENEXR_DLL' should be among those in that list.
>
>This is assuming OPenEXR doesn't come with static lib vcproject files
>already (haven't checked latest CVS on this) so you'll have to compile
>your own static libs from OpenEXR source. Which is not hard to do.
>
>Now if you wish to create OpenEXR static libraries, you'll have to do
>a few things:
>
>- copy (or change) the OpenEXR project files
>- get rid of that OPENEXR_DLL item in there - for EACH project; that
>includes both the OpenEXR libraries themselves and the binaries using
>the static libraries.
>- make sure the project target for each OpenEXR project now is a
>'static library' instead of a DLL.
>
>Normally I do the third item by hand in UltraEdit with a macro and a
>bit of hand work because I'm faster that way and am assured I don't
>get wicked project dependency collisions in MSVC, as I also remove the
>project GUIDs, which you can't do from the UI.
>
>
>For more info on this: Copy&Paste from previous email regarding this in 
this ML:
>
>----c&p from 'working solutions for x64 windows build' conversation 
here---
>---answer to question how to make static lib vcproj files from dll ones---
>On Thu, Sep 11, 2008 at 5:58 PM, Ger Hobbelt <[email protected]> wrote:
> > Erm, not really, but I can see what I can do regarding that. Isn't
> > that hard to do really - it just takes time.
> >
> > Basic trick would be along these lines: get the vcproj files for the
> > DLLs in a text editor; kill the GUIDs at the top (as you are creating
> > different projects) and change the type code (a number) to the number
> > you see appearing in any static lib vcproj, then save as different
> > filenames. The .sln will be blown to smithereens then, so you'll have
> > to setup build dependencies between libs from scratch. Oh, And the
> > post-build lines calling the createDLL tool have to be removed from
> > the vcproj files as well.
> >
> > After that, it's a few rounds of building the stuff and checking all
> > the compiler and linker settings (including preprocessor symbols) and
> > making sure that the test apps actually run.
>[...]
>---------------------------------------------------------------------------------------

>
>--
>Met vriendelijke groeten / Best regards,
>
>Ger Hobbelt
>
>--------------------------------------------------
>web: http://www.hobbelt.com/
>  http://www.hebbut.net/
>mail: [email protected]
>mobile: +31-6-11 120 978
>--------------------------------------------------