openexr-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-user] Fwd: Question about openEXR-1.6.1


From: Ger Hobbelt
Subject: Re: [Openexr-user] Fwd: Question about openEXR-1.6.1
Date: Sat, 20 Sep 2008 02:37:19 +0200

On Fri, Sep 19, 2008 at 8:54 PM, Okubo hiroyuki <address@hidden> 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 <address@hidden> 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: address@hidden
mobile: +31-6-11 120 978
--------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]