Discussion:
[Openexr-user] Fwd: Question about openEXR-1.6.1
Ger Hobbelt
2008-09-18 08:49:18 UTC
Permalink
Hi,

Forwarded this to the ML in hopes someone's got an idea for a working
answer here. I hope Mr. Hiroyuki subscribes to the ML asap, so he can
see what you guys have to say as well.
Please tell me if -user is the proper spot for this, or that we should
move off to the -devel ML? thanks!

See the original email below the second line of dashes.

Preliminary answer follows here:
----------------------------------

Dear Mr. Hiroyuki,

Best advise I can give right now is subscribe to the OpenEXR mailing
lists (-user and -devel at least) at the place where it all came from:

http://www.openexr.com/mailinglist.html


I forward this question to the -- I hope appropriate -- user ML (see
web page above), as I have _no_ experience with MAYA and am using
OpenEXR for quite different purposes, so I don't know what the Maya
specific requirements are for a shader to show up and work. (I have
written a few 3dsmax bits once and there and then you even had to use
the _exact_ same compiler as they did, so your issue may be something
like that for Maya shaders/plugins, as well.)


Given my uber-n00bness regarding things Maya, the way I'd approach
this would be to verify my build setup in a somewhat round-about way:

0) Check their (= Autodesk/Maya) advice/documentation regarding the
compiler to use. Like I said, in the past, for 3dsmax, you had to
perform some additional magic when you were NOT using their 'advised'
compiler -- this has to do with both heap allocation and C++ name
mangling. Don't know if those culprits apply to Maya as well.

1) look in their SDK for MSVC projects that create .mi plugins/shaders
and check those compiler and linker settings with my own, bit for bit
and use my generic experience of what may work together and what not
(Unicode vs. MBCS, for instance, can produce some 'nice' run-time
bugs, so can different compiler/run-time library versions).

2) Grab a few .mi files that work (from my 5' look at Maya once, I
seem to recall those are renamed .dll's, right?) and get the 'depends'
tool to check their DLL dependencies compared to the DLLs produced by
my projects. When different run-time (MSVC*.DLL, ...) dll's are in
use, that may be a hint why Maya rejects your own produce.
'depends' can be had here:

http://www.dependencywalker.com/

3) ... out of ideas right there ...





Original email:
----------------------------------

---------- Forwarded message ----------
From: Okubo hiroyuki <***@hotmail.com>
Date: Thu, Sep 18, 2008 at 7:29 AM
Subject: Question about openEXR-1.6.1
To: ***@hebbut.net


Hello. hebbut. I just found your site from google.
I am a Lighting TD at a company called RIOT in santa monica.
I am trying to compile shaders_p v.3.2 beta 9 for Maya (2008 SP1 or
Ext2) with openEXR-1.6.1.
I compiled openEXR part ,linked with shaders_p then compiled shaders_p
without any errors.
I installed dll and mi file into mentalray folder in maya folder. when
I start maya, it loads fine but
when I start to render, it pops up the following error..

// Warning: (Mayatomr.Custom) : C:/Program
Files/Autodesk/Maya2008/mentalray/include/hero.mi: couldn't find
shader library //

I even used your pre-compile OpenEXR lib from your site. but no luck.
I took the open_exr_saver shader(which involve openEXR lib) out from
Visual studio project to make sure if the linking part of openExr is
wrong, and then shaders worked fine. So I guess some setting of
openEXR in VC is something wrong. but I can't figure that out. By the
way, the precomiled shader a guy made works fine. so I am doing
something wrong.
Could you point me in the right direction when you have a chance, please?

My work environments are follow

windows Vista(x86)
Maya2008 Ext2 32bit (mental ray for Maya9.0.1)mental ray version(3.6.51.0)
Visual Studio 2005(32bit)

I also attached my Visual Studio project file.
Any help would be appreciated.
Thank you very much.


Hiroyuki
***@hotmail.com




--
Met vriendelijke groeten / Best regards,

Ger Hobbelt

--------------------------------------------------
web: http://www.hobbelt.com/
http://www.hebbut.net/
mail: ***@hobbelt.com
mobile: +31-6-11 120 978
--------------------------------------------------
Dave Lajoie
2008-09-18 16:04:59 UTC
Permalink
Hi my name is Dave Lajoie, product designer rendering, Maya Team. I just registered to the list since in Maya 2009 we have a very strong openEXR support with our new render passes (mental ray). Sorry for the shameless plug.

I want to provide some information about openEXR library. In mental ray 3.5, the openEXR library was external to mental ray, contained in a dll/so
In mental ray 3.6, the openEXR is statically linked in mental ray. I believe the openEXR version used is 1.6
How many dlls are required for your shader?

Dave.

On 18/09/08 4:49 AM, "Ger Hobbelt" <***@hobbelt.com> wrote:

Hi,

Forwarded this to the ML in hopes someone's got an idea for a working
answer here. I hope Mr. Hiroyuki subscribes to the ML asap, so he can
see what you guys have to say as well.
Please tell me if -user is the proper spot for this, or that we should
move off to the -devel ML? thanks!

See the original email below the second line of dashes.

Preliminary answer follows here:
----------------------------------

Dear Mr. Hiroyuki,

Best advise I can give right now is subscribe to the OpenEXR mailing
lists (-user and -devel at least) at the place where it all came from:

http://www.openexr.com/mailinglist.html


I forward this question to the -- I hope appropriate -- user ML (see
web page above), as I have _no_ experience with MAYA and am using
OpenEXR for quite different purposes, so I don't know what the Maya
specific requirements are for a shader to show up and work. (I have
written a few 3dsmax bits once and there and then you even had to use
the _exact_ same compiler as they did, so your issue may be something
like that for Maya shaders/plugins, as well.)


Given my uber-n00bness regarding things Maya, the way I'd approach
this would be to verify my build setup in a somewhat round-about way:

0) Check their (= Autodesk/Maya) advice/documentation regarding the
compiler to use. Like I said, in the past, for 3dsmax, you had to
perform some additional magic when you were NOT using their 'advised'
compiler -- this has to do with both heap allocation and C++ name
mangling. Don't know if those culprits apply to Maya as well.

1) look in their SDK for MSVC projects that create .mi plugins/shaders
and check those compiler and linker settings with my own, bit for bit
and use my generic experience of what may work together and what not
(Unicode vs. MBCS, for instance, can produce some 'nice' run-time
bugs, so can different compiler/run-time library versions).

2) Grab a few .mi files that work (from my 5' look at Maya once, I
seem to recall those are renamed .dll's, right?) and get the 'depends'
tool to check their DLL dependencies compared to the DLLs produced by
my projects. When different run-time (MSVC*.DLL, ...) dll's are in
use, that may be a hint why Maya rejects your own produce.
'depends' can be had here:

http://www.dependencywalker.com/

3) ... out of ideas right there ...





Original email:
----------------------------------

---------- Forwarded message ----------
From: Okubo hiroyuki <***@hotmail.com>
Date: Thu, Sep 18, 2008 at 7:29 AM
Subject: Question about openEXR-1.6.1
To: ***@hebbut.net


Hello. hebbut. I just found your site from google.
I am a Lighting TD at a company called RIOT in santa monica.
I am trying to compile shaders_p v.3.2 beta 9 for Maya (2008 SP1 or
Ext2) with openEXR-1.6.1.
I compiled openEXR part ,linked with shaders_p then compiled shaders_p
without any errors.
I installed dll and mi file into mentalray folder in maya folder. when
I start maya, it loads fine but
when I start to render, it pops up the following error..

// Warning: (Mayatomr.Custom) : C:/Program
Files/Autodesk/Maya2008/mentalray/include/hero.mi: couldn't find
shader library //

I even used your pre-compile OpenEXR lib from your site. but no luck.
I took the open_exr_saver shader(which involve openEXR lib) out from
Visual studio project to make sure if the linking part of openExr is
wrong, and then shaders worked fine. So I guess some setting of
openEXR in VC is something wrong. but I can't figure that out. By the
way, the precomiled shader a guy made works fine. so I am doing
something wrong.
Could you point me in the right direction when you have a chance, please?

My work environments are follow

windows Vista(x86)
Maya2008 Ext2 32bit (mental ray for Maya9.0.1)mental ray version(3.6.51.0)
Visual Studio 2005(32bit)

I also attached my Visual Studio project file.
Any help would be appreciated.
Thank you very much.


Hiroyuki
***@hotmail.com




--
Met vriendelijke groeten / Best regards,

Ger Hobbelt

--------------------------------------------------
web: http://www.hobbelt.com/
http://www.hebbut.net/
mail: ***@hobbelt.com
mobile: +31-6-11 120 978
--------------------------------------------------
Ger Hobbelt
2008-09-18 16:33:26 UTC
Permalink
Excellent plug, Dave! ;-)

I'll forward this to Mr. Hiroyuki - haven't heard from him yet
subscribing to this ML and he's the one who submitted this particular
question over at my place (see bottom part of email). I'd very much
prefer to see this discussion happening in this ML as I expect others
using OpenEXR will benefit from it as well in the future (heck, I
might end up having to check the answers myself later on. ;-) )

After this email of mine, I expect Mr. Hiroyuki to pick up the
conversation and answer your question below on this ML (just to
prevent useless back-and-fro juggling by me).

Thanks,

Ger


--------------------------------
Post by Dave Lajoie
Hi my name is Dave Lajoie, product designer rendering, Maya Team. I just registered to the list since in Maya 2009 we have a very strong openEXR support with our new render passes (mental ray). Sorry for the shameless plug.
I want to provide some information about openEXR library. In mental ray 3.5, the openEXR library was external to mental ray, contained in a dll/so
In mental ray 3.6, the openEXR is statically linked in mental ray. I believe the openEXR version used is 1.6
How many dlls are required for your shader?
Dave.
Hi,
Forwarded this to the ML in hopes someone's got an idea for a working
answer here. I hope Mr. Hiroyuki subscribes to the ML asap, so he can
see what you guys have to say as well.
Please tell me if -user is the proper spot for this, or that we should
move off to the -devel ML? thanks!
See the original email below the second line of dashes.
----------------------------------
Dear Mr. Hiroyuki,
Best advise I can give right now is subscribe to the OpenEXR mailing
http://www.openexr.com/mailinglist.html
I forward this question to the -- I hope appropriate -- user ML (see
web page above), as I have _no_ experience with MAYA and am using
OpenEXR for quite different purposes, so I don't know what the Maya
specific requirements are for a shader to show up and work. (I have
written a few 3dsmax bits once and there and then you even had to use
the _exact_ same compiler as they did, so your issue may be something
like that for Maya shaders/plugins, as well.)
Given my uber-n00bness regarding things Maya, the way I'd approach
0) Check their (= Autodesk/Maya) advice/documentation regarding the
compiler to use. Like I said, in the past, for 3dsmax, you had to
perform some additional magic when you were NOT using their 'advised'
compiler -- this has to do with both heap allocation and C++ name
mangling. Don't know if those culprits apply to Maya as well.
1) look in their SDK for MSVC projects that create .mi plugins/shaders
and check those compiler and linker settings with my own, bit for bit
and use my generic experience of what may work together and what not
(Unicode vs. MBCS, for instance, can produce some 'nice' run-time
bugs, so can different compiler/run-time library versions).
2) Grab a few .mi files that work (from my 5' look at Maya once, I
seem to recall those are renamed .dll's, right?) and get the 'depends'
tool to check their DLL dependencies compared to the DLLs produced by
my projects. When different run-time (MSVC*.DLL, ...) dll's are in
use, that may be a hint why Maya rejects your own produce.
http://www.dependencywalker.com/
3) ... out of ideas right there ...
----------------------------------
---------- Forwarded message ----------
Date: Thu, Sep 18, 2008 at 7:29 AM
Subject: Question about openEXR-1.6.1
Hello. hebbut. I just found your site from google.
I am a Lighting TD at a company called RIOT in santa monica.
I am trying to compile shaders_p v.3.2 beta 9 for Maya (2008 SP1 or
Ext2) with openEXR-1.6.1.
I compiled openEXR part ,linked with shaders_p then compiled shaders_p
without any errors.
I installed dll and mi file into mentalray folder in maya folder. when
I start maya, it loads fine but
when I start to render, it pops up the following error..
// Warning: (Mayatomr.Custom) : C:/Program
Files/Autodesk/Maya2008/mentalray/include/hero.mi: couldn't find
shader library //
I even used your pre-compile OpenEXR lib from your site. but no luck.
I took the open_exr_saver shader(which involve openEXR lib) out from
Visual studio project to make sure if the linking part of openExr is
wrong, and then shaders worked fine. So I guess some setting of
openEXR in VC is something wrong. but I can't figure that out. By the
way, the precomiled shader a guy made works fine. so I am doing
something wrong.
Could you point me in the right direction when you have a chance, please?
My work environments are follow
windows Vista(x86)
Maya2008 Ext2 32bit (mental ray for Maya9.0.1)mental ray version(3.6.51.0)
Visual Studio 2005(32bit)
I also attached my Visual Studio project file.
Any help would be appreciated.
Thank you very much.
Hiroyuki
--
Met vriendelijke groeten / Best regards,
Ger Hobbelt
--------------------------------------------------
web: http://www.hobbelt.com/
http://www.hebbut.net/
mobile: +31-6-11 120 978
--------------------------------------------------
_______________________________________________
Openexr-user mailing list
http://lists.nongnu.org/mailman/listinfo/openexr-user
--
Met vriendelijke groeten / Best regards,

Ger Hobbelt

--------------------------------------------------
web: http://www.hobbelt.com/
http://www.hebbut.net/
mail: ***@hobbelt.com
mobile: +31-6-11 120 978
--------------------------------------------------
Okubo hiroyuki
2008-09-19 18:54:13 UTC
Permalink
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..
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?
Thanks.

Hiro
Subject: RE: [Openexr-user] Fwd: Question about openEXR-1.6.1
Date: Thu, 18 Sep 2008 12:28:01 -0700
MIME-Version: 1.0
Received: from gateway01.lucasfilm.com ([63.82.98.221]) by
bay0-mc6-f4.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Thu, 18
Sep 2008 12:28:02 -0700
Received: from Mailbox01.lucas.alllucas.com ([10.66.4.7]) by
gateway01.lucasfilm.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 18 Sep
2008 12:28:01 -0700
X-Message-Delivery: Vj0zLjQuMDt1cz0wO2w9MDthPTA=
JGTYoYF78jFBgArGq2wOMad4BMF7I2VdyGVzNMhM6aptfd2zCmdQrJMyq1PrNknXYodx+9UgrYhwP1VcrnFwPEGYGfoRte0B
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
Thread-Topic: [Openexr-user] Fwd: Question about openEXR-1.6.1
Thread-Index: AckZrFVVTHCULy1iSGmyI6dB5cWSCgAF58vQ
X-OriginalArrivalTime: 18 Sep 2008 19:28:01.0437 (UTC)
FILETIME=[AA1224D0:01C919C4]
To be clear, is the question
- how do I link statically with OpenEXR on Windows?
answer: make sure OPENEXR_DLL is not defined in any of your
projects
or
- what DLLs need to be in the path for OpenEXR when used dynamically on
Windows?
short answer: all of the ones in the package, and zlib
longer answer: if you run depends.exe in the VS distribution,
open your plugin after running depends from the command line in
the directory your plugin resides. Any missing DLL's will be
identified and highlighted in red.
-----Original Message-----
Behalf Of Ger Hobbelt
Sent: Thursday, September 18, 2008 9:33 AM
To: Dave Lajoie; Okubo hiroyuki
Subject: Re: [Openexr-user] Fwd: Question about openEXR-1.6.1
Excellent plug, Dave! ;-)
I'll forward this to Mr. Hiroyuki - haven't heard from him yet
subscribing to this ML and he's the one who submitted this particular
question over at my place (see bottom part of email). I'd very much
prefer to see this discussion happening in this ML as I expect others
using OpenEXR will benefit from it as well in the future (heck, I
might end up having to check the answers myself later on. ;-) )
After this email of mine, I expect Mr. Hiroyuki to pick up the
conversation and answer your question below on this ML (just to
prevent useless back-and-fro juggling by me).
Thanks,
Ger
--------------------------------
Post by Dave Lajoie
Hi my name is Dave Lajoie, product designer rendering, Maya Team. I
just registered to the list since in Maya 2009 we have a very strong
openEXR support with our new render passes (mental ray). Sorry for the
shameless plug.
Post by Dave Lajoie
I want to provide some information about openEXR library. In mental
ray 3.5, the openEXR library was external to mental ray, contained in a
dll/so
Post by Dave Lajoie
In mental ray 3.6, the openEXR is statically linked in mental ray. I
believe the openEXR version used is 1.6
Post by Dave Lajoie
How many dlls are required for your shader?
Dave.
Hi,
Forwarded this to the ML in hopes someone's got an idea for a working
answer here. I hope Mr. Hiroyuki subscribes to the ML asap, so he can
see what you guys have to say as well.
Please tell me if -user is the proper spot for this, or that we should
move off to the -devel ML? thanks!
See the original email below the second line of dashes.
----------------------------------
Dear Mr. Hiroyuki,
Best advise I can give right now is subscribe to the OpenEXR mailing
http://www.openexr.com/mailinglist.html
I forward this question to the -- I hope appropriate -- user ML (see
web page above), as I have _no_ experience with MAYA and am using
OpenEXR for quite different purposes, so I don't know what the Maya
specific requirements are for a shader to show up and work. (I have
written a few 3dsmax bits once and there and then you even had to use
the _exact_ same compiler as they did, so your issue may be something
like that for Maya shaders/plugins, as well.)
Given my uber-n00bness regarding things Maya, the way I'd approach
0) Check their (= Autodesk/Maya) advice/documentation regarding the
compiler to use. Like I said, in the past, for 3dsmax, you had to
perform some additional magic when you were NOT using their 'advised'
compiler -- this has to do with both heap allocation and C++ name
mangling. Don't know if those culprits apply to Maya as well.
1) look in their SDK for MSVC projects that create .mi plugins/shaders
and check those compiler and linker settings with my own, bit for bit
and use my generic experience of what may work together and what not
(Unicode vs. MBCS, for instance, can produce some 'nice' run-time
bugs, so can different compiler/run-time library versions).
2) Grab a few .mi files that work (from my 5' look at Maya once, I
seem to recall those are renamed .dll's, right?) and get the 'depends'
tool to check their DLL dependencies compared to the DLLs produced by
my projects. When different run-time (MSVC*.DLL, ...) dll's are in
use, that may be a hint why Maya rejects your own produce.
http://www.dependencywalker.com/
3) ... out of ideas right there ...
----------------------------------
---------- Forwarded message ----------
Date: Thu, Sep 18, 2008 at 7:29 AM
Subject: Question about openEXR-1.6.1
Hello. hebbut. I just found your site from google.
I am a Lighting TD at a company called RIOT in santa monica.
I am trying to compile shaders_p v.3.2 beta 9 for Maya (2008 SP1 or
Ext2) with openEXR-1.6.1.
I compiled openEXR part ,linked with shaders_p then compiled shaders_p
without any errors.
I installed dll and mi file into mentalray folder in maya folder. when
I start maya, it loads fine but
when I start to render, it pops up the following error..
// Warning: (Mayatomr.Custom) : C:/Program
Files/Autodesk/Maya2008/mentalray/include/hero.mi: couldn't find
shader library //
I even used your pre-compile OpenEXR lib from your site. but no luck.
I took the open_exr_saver shader(which involve openEXR lib) out from
Visual studio project to make sure if the linking part of openExr is
wrong, and then shaders worked fine. So I guess some setting of
openEXR in VC is something wrong. but I can't figure that out. By the
way, the precomiled shader a guy made works fine. so I am doing
something wrong.
Could you point me in the right direction when you have a chance,
please?
Post by Dave Lajoie
My work environments are follow
windows Vista(x86)
Maya2008 Ext2 32bit (mental ray for Maya9.0.1)mental ray
version(3.6.51.0)
Post by Dave Lajoie
Visual Studio 2005(32bit)
I also attached my Visual Studio project file.
Any help would be appreciated.
Thank you very much.
Hiroyuki
--
Met vriendelijke groeten / Best regards,
Ger Hobbelt
--------------------------------------------------
web: http://www.hobbelt.com/
http://www.hebbut.net/
mobile: +31-6-11 120 978
--------------------------------------------------
_______________________________________________
Openexr-user mailing list
http://lists.nongnu.org/mailman/listinfo/openexr-user
--
Met vriendelijke groeten / Best regards,
Ger Hobbelt
--------------------------------------------------
web: http://www.hobbelt.com/
http://www.hebbut.net/
mobile: +31-6-11 120 978
--------------------------------------------------
_______________________________________________
Openexr-user mailing list
http://lists.nongnu.org/mailman/listinfo/openexr-user
Ger Hobbelt
2008-09-20 00:37:19 UTC
Permalink
Post by Okubo hiroyuki
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.
Post by Okubo hiroyuki
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---
Post by Okubo hiroyuki
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: ***@hobbelt.com
mobile: +31-6-11 120 978
--------------------------------------------------
Okubo hiroyuki
2008-09-22 17:14:11 UTC
Permalink
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
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
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=
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=
X-Google-Sender-Auth: d82d0ab0f75ae3b6
X-OriginalArrivalTime: 20 Sep 2008 00:37:19.0940 (UTC)
FILETIME=[0A36B840:01C91AB9]
Post by Okubo hiroyuki
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.
Post by Okubo hiroyuki
and It worked. I supposed that the shader was linked statically but it
is
Post by Okubo hiroyuki
not...
So how do I link statically...
answer: make sure OPENEXR_DLL is not defined in any of your
projects
Post by Okubo hiroyuki
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
in MSVC, right click on each of the projects, then select 'Properties'
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
- 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
----c&p from 'working solutions for x64 windows build' conversation
here---
---answer to question how to make static lib vcproj files from dll ones---
Post by Okubo hiroyuki
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/
mobile: +31-6-11 120 978
--------------------------------------------------
Ger Hobbelt
2008-09-22 20:27:31 UTC
Permalink
Post by Okubo hiroyuki
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.
You're welcome!

Take care,

Ger
--
Met vriendelijke groeten / Best regards,

Ger Hobbelt

--------------------------------------------------
web: http://www.hobbelt.com/
http://www.hebbut.net/
mail: ***@hobbelt.com
mobile: +31-6-11 120 978
--------------------------------------------------
Loading...