Rodrigo Urra | 1 Jul 02:53
Picon

Ilmbase 1.0.1 and OpenEXR 1.6.1 under Windows x64

Hello,

The demand for building programs under 64-bit configuration is growing, which is what brings me here :)

I'm having issues compiling Ilmbase 1.0.1 and OpenEXR 1.6.1 under Visual Studio 2008, using a x64 platform configuration, and was hoping to get some help. If for instance, one takes the original distribution, adds an x64 configuration and tries to Build Ilmbase, the linker errors are numerous. See below.

Could someone please explain how to successfully build, or at least point to OpenEXR 1.6.1 pre-built x64 libs and dlls?

Thank you!

Error    2    error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class half)" (??6 <at> YAAEAV?$basic_ostream <at> DU?$char_traits <at> D <at> std <at> <at> <at> std <at> <at> AEAV01 <at> Vhalf <at> <at> <at> Z)    testClassification.obj
Error    3    error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class half)" (??6 <at> YAAEAV?$basic_ostream <at> DU?$char_traits <at> D <at> std <at> <at> <at> std <at> <at> AEAV01 <at> Vhalf <at> <at> <at> Z)    testError.obj
Error    4    error LNK2001: unresolved external symbol "private: static short __cdecl half::convert(int)" (?convert <at> half <at> <at> CAFH <at> Z)    testFunction.obj
Error    5    error LNK2001: unresolved external symbol "private: static short __cdecl half::convert(int)" (?convert <at> half <at> <at> CAFH <at> Z)    testLimits.obj
Error    7    error LNK2001: unresolved external symbol "private: static short __cdecl half::convert(int)" (?convert <at> half <at> <at> CAFH <at> Z)    testBitPatterns.obj
Error    8    error LNK2001: unresolved external symbol "private: static short __cdecl half::convert(int)" (?convert <at> half <at> <at> CAFH <at> Z)    testClassification.obj
Error    9    error LNK2001: unresolved external symbol "private: static short __cdecl half::convert(int)" (?convert <at> half <at> <at> CAFH <at> Z)    testError.obj
Error    13    error LNK2001: unresolved external symbol "void __cdecl printBits(class std::basic_ostream<char,struct std::char_traits<char> > &,class half)" (?printBits <at> <at> YAXAEAV?$basic_ostream <at> DU?$char_traits <at> D <at> std <at> <at> <at> std <at> <at> Vhalf <at> <at> <at> Z)    testClassification.obj
Error    14    error LNK2001: unresolved external symbol "void __cdecl printBits(class std::basic_ostream<char,struct std::char_traits<char> > &,class half)" (?printBits <at> <at> YAXAEAV?$basic_ostream <at> DU?$char_traits <at> D <at> std <at> <at> <at> std <at> <at> Vhalf <at> <at> <at> Z)    testError.obj
Error    1    error LNK2019: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class half)" (??6 <at> YAAEAV?$basic_ostream <at> DU?$char_traits <at> D <at> std <at> <at> <at> std <at> <at> AEAV01 <at> Vhalf <at> <at> <at> Z) referenced in function "void __cdecl testArithmetic(void)" (?testArithmetic <at> <at> YAXXZ)    testArithmetic.obj
Error    6    error LNK2019: unresolved external symbol "private: static short __cdecl half::convert(int)" (?convert <at> half <at> <at> CAFH <at> Z) referenced in function "public: __cdecl half::half(float)" (??0half <at> <at> QEAA <at> M <at> Z)    testArithmetic.obj
Error    11    error LNK2019: unresolved external symbol "void __cdecl printBits(char * const,class half)" (?printBits <at> <at> YAXQEADVhalf <at> <at> <at> Z) referenced in function "void __cdecl `anonymous namespace'::testBits(float,char const * const,char const * const)" (?testBits <at> ?A0x5c734a8f <at> <at> YAXMQEBD0 <at> Z)    testBitPatterns.obj
Error    10    error LNK2019: unresolved external symbol "void __cdecl printBits(char * const,float)" (?printBits <at> <at> YAXQEADM <at> Z) referenced in function "void __cdecl `anonymous namespace'::testBits(float,char const * const,char const * const)" (?testBits <at> ?A0x5c734a8f <at> <at> YAXMQEBD0 <at> Z)    testBitPatterns.obj
Error    12    error LNK2019: unresolved external symbol "void __cdecl printBits(class std::basic_ostream<char,struct std::char_traits<char> > &,class half)" (?printBits <at> <at> YAXAEAV?$basic_ostream <at> DU?$char_traits <at> D <at> std <at> <at> <at> std <at> <at> Vhalf <at> <at> <at> Z) referenced in function "void __cdecl `anonymous namespace'::testBits(float,char const * const,char const * const)" (?testBits <at> ?A0x5c734a8f <at> <at> YAXMQEBD0 <at> Z)    testBitPatterns.obj
Error    15    error LNK2019: unresolved external symbol "void __cdecl printBits(class std::basic_ostream<char,struct std::char_traits<char> > &,float)" (?printBits <at> <at> YAXAEAV?$basic_ostream <at> DU?$char_traits <at> D <at> std <at> <at> <at> std <at> <at> M <at> Z) referenced in function "void __cdecl `anonymous namespace'::testBits(float,char const * const,char const * const)" (?testBits <at> ?A0x5c734a8f <at> <at> YAXMQEBD0 <at> Z)    testBitPatterns.obj
Error    16    fatal error LNK1120: 6 unresolved externals    x64\Release/HalfTest.exe

_______________________________________________
Openexr-devel mailing list
Openexr-devel <at> nongnu.org
http://lists.nongnu.org/mailman/listinfo/openexr-devel
Bo Schwarzstein | 3 Jul 05:06
Picon

Re: [Openexr-devel] Ilmbase 1.0.1 and OpenEXR 1.6.1 under Windows x64

Hello Rodrigo,

The almost proper operation steps are like this,

  1. Make a work directory in one of your disk ( my is F:\Workshop )
  2. Uncompress the ilmbase-1.0.1.tar.gz and openexr-1.6.1.tar.gz under the work directory (just like F:\Workshop\ilmbase-1.0.1\config and others stuff )
  3. Open the Visual Studio solution file according your IDE (my is VC8), change the target to Release (I like RELEASE version)
  4. Launch the Command Prompt in VS
  5. Get into the F:\Workshop\ilmbase-1.0.1\Half, input cl eLut.cpp and cl toFloat.cpp to compile the LUTs
  6. Type eLut > eLut.h and toFloat > toFloat.h to generate the lut files
  7. Compile the Half project in VS, it should be okay.
  8. You will find it create a directory names F:\Deploy, and it copied the lib, include, bin files in each directory.
  9. Go to http://www.zlib.net/, download the DLL version, copy the zdll.lib to the F:\Deploy\lib\Release\
  10. Open the OpenEXR's VC8 project, try to compile, there should be no problem.
Please have a try, I tried for several times and been successful to compile the libraries. I wish OpenEXR could use the CMake in further version.

Thanks.

2009/7/3 Rodrigo Urra <koraxen <at> gmail.com>
Hi Bo, and thanks for the reply.

Could you elaborate a little further please? I'm not 100% familiar with Visual Studio's project build settings / macros.

Thanks again,
- Rodrigo

On Tue, Jun 30, 2009 at 11:48 PM, Bo Schwarzstein <bo.schwarzstein <at> gmail.com> wrote:
Hi,

In fact, it's still very painful to compile OpenEXR under Visual Studio. According your error information, it seems that the half in ILMBase did not export the entry correctly, you could manual setup the macros in order to generate the proper library files.

Thanks.

2009/7/1 Rodrigo Urra <koraxen <at> gmail.com>
Hello,

The demand for building programs under 64-bit configuration is growing, which is what brings me here :)

I'm having issues compiling Ilmbase 1.0.1 and OpenEXR 1.6.1 under Visual Studio 2008, using a x64 platform configuration, and was hoping to get some help. If for instance, one takes the original distribution, adds an x64 configuration and tries to Build Ilmbase, the linker errors are numerous. See below.

Could someone please explain how to successfully build, or at least point to OpenEXR 1.6.1 pre-built x64 libs and dlls?

Thank you!

Error    2    error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class half)" (??6 <at> YAAEAV?$basic_ostream <at> DU?$char_traits <at> D <at> std <at> <at> <at> std <at> <at> AEAV01 <at> Vhalf <at> <at> <at> Z)    testClassification.obj
Error    3    error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class half)" (??6 <at> YAAEAV?$basic_ostream <at> DU?$char_traits <at> D <at> std <at> <at> <at> std <at> <at> AEAV01 <at> Vhalf <at> <at> <at> Z)    testError.obj
Error    4    error LNK2001: unresolved external symbol "private: static short __cdecl half::convert(int)" (?convert <at> half <at> <at> CAFH <at> Z)    testFunction.obj
Error    5    error LNK2001: unresolved external symbol "private: static short __cdecl half::convert(int)" (?convert <at> half <at> <at> CAFH <at> Z)    testLimits.obj
Error    7    error LNK2001: unresolved external symbol "private: static short __cdecl half::convert(int)" (?convert <at> half <at> <at> CAFH <at> Z)    testBitPatterns.obj
Error    8    error LNK2001: unresolved external symbol "private: static short __cdecl half::convert(int)" (?convert <at> half <at> <at> CAFH <at> Z)    testClassification.obj
Error    9    error LNK2001: unresolved external symbol "private: static short __cdecl half::convert(int)" (?convert <at> half <at> <at> CAFH <at> Z)    testError.obj
Error    13    error LNK2001: unresolved external symbol "void __cdecl printBits(class std::basic_ostream<char,struct std::char_traits<char> > &,class half)" (?printBits <at> <at> YAXAEAV?$basic_ostream <at> DU?$char_traits <at> D <at> std <at> <at> <at> std <at> <at> Vhalf <at> <at> <at> Z)    testClassification.obj
Error    14    error LNK2001: unresolved external symbol "void __cdecl printBits(class std::basic_ostream<char,struct std::char_traits<char> > &,class half)" (?printBits <at> <at> YAXAEAV?$basic_ostream <at> DU?$char_traits <at> D <at> std <at> <at> <at> std <at> <at> Vhalf <at> <at> <at> Z)    testError.obj
Error    1    error LNK2019: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class half)" (??6 <at> YAAEAV?$basic_ostream <at> DU?$char_traits <at> D <at> std <at> <at> <at> std <at> <at> AEAV01 <at> Vhalf <at> <at> <at> Z) referenced in function "void __cdecl testArithmetic(void)" (?testArithmetic <at> <at> YAXXZ)    testArithmetic.obj
Error    6    error LNK2019: unresolved external symbol "private: static short __cdecl half::convert(int)" (?convert <at> half <at> <at> CAFH <at> Z) referenced in function "public: __cdecl half::half(float)" (??0half <at> <at> QEAA <at> M <at> Z)    testArithmetic.obj
Error    11    error LNK2019: unresolved external symbol "void __cdecl printBits(char * const,class half)" (?printBits <at> <at> YAXQEADVhalf <at> <at> <at> Z) referenced in function "void __cdecl `anonymous namespace'::testBits(float,char const * const,char const * const)" (?testBits <at> ?A0x5c734a8f <at> <at> YAXMQEBD0 <at> Z)    testBitPatterns.obj
Error    10    error LNK2019: unresolved external symbol "void __cdecl printBits(char * const,float)" (?printBits <at> <at> YAXQEADM <at> Z) referenced in function "void __cdecl `anonymous namespace'::testBits(float,char const * const,char const * const)" (?testBits <at> ?A0x5c734a8f <at> <at> YAXMQEBD0 <at> Z)    testBitPatterns.obj
Error    12    error LNK2019: unresolved external symbol "void __cdecl printBits(class std::basic_ostream<char,struct std::char_traits<char> > &,class half)" (?printBits <at> <at> YAXAEAV?$basic_ostream <at> DU?$char_traits <at> D <at> std <at> <at> <at> std <at> <at> Vhalf <at> <at> <at> Z) referenced in function "void __cdecl `anonymous namespace'::testBits(float,char const * const,char const * const)" (?testBits <at> ?A0x5c734a8f <at> <at> YAXMQEBD0 <at> Z)    testBitPatterns.obj
Error    15    error LNK2019: unresolved external symbol "void __cdecl printBits(class std::basic_ostream<char,struct std::char_traits<char> > &,float)" (?printBits <at> <at> YAXAEAV?$basic_ostream <at> DU?$char_traits <at> D <at> std <at> <at> <at> std <at> <at> M <at> Z) referenced in function "void __cdecl `anonymous namespace'::testBits(float,char const * const,char const * const)" (?testBits <at> ?A0x5c734a8f <at> <at> YAXMQEBD0 <at> Z)    testBitPatterns.obj
Error    16    fatal error LNK1120: 6 unresolved externals    x64\Release/HalfTest.exe


_______________________________________________
Openexr-devel mailing list
Openexr-devel <at> nongnu.org
http://lists.nongnu.org/mailman/listinfo/openexr-devel




_______________________________________________
Openexr-user mailing list
Openexr-user <at> nongnu.org
http://lists.nongnu.org/mailman/listinfo/openexr-user
Thomas Binder | 17 Jul 19:24
Picon

R6034 with OpenEXR and Visual Studio 2008

Hi,

there are one or two threads around on this topic, they were of no
help to me so far. Here is a short description of my problem:

Setup:

- I want/must use OpenEXR as dll with my own Windows XP 32 bit C++ application
- I want/must use Visual Studio 2008 Standard Edition (VC9), SP1 is installed
- I took the ilmbase 1.0.1, openexr 1.6.1 source code and converted
the projects via the Visual Studio conversion wizardry
- Was able to eliminate all undefined symbols, everything compiles and
links fine.

Problem:

Consistent runtime error R6034 when loading OpenEXR dlls. Spelled out
R6034 means that an application or dll has attempted to load the MSVC
runtime without using a manifest.

Indeed, my main application finds the runtime in
C:\windows\winsxs\...., which is good, while the openexr dlls are
looking in $PATH only. If I remove all MSVC*90.DLL from the path, the
openexr dlls will not load.

Remarks:

I used mt.exe (manifest tool, unrelated to magnetic tape) to put the
generated manifests into the dlls. Running mt works fine, and the XML
is indeed incorporated into the dll. However, this does not change
anything. Any dll is created via the createDLL linker wrapper, which I
am currently looking at.

Your input on this issue is really appreciated. The solution may be
simple - my experience with things like this is limited.

Thanks,
Tom
Ger Hobbelt | 18 Jul 05:08
Favicon
Gravatar

Re: R6034 with OpenEXR and Visual Studio 2008

I have not run into this issue with OpenEXR itself, though I've seen
it happen with different libs a couple of times; from the sound of it
you already found that the usual culprit here is  the Manifest
Apocalypse, which is visited upon us since MS 'solved' DLL Hell for us
since MSVC2005 and those adorable manifests.

So here's the questions that remain, given that you incorporate the
menifest in the DLLs:

1) are you building your own binaries, which invoke OpenEXR, using the
very same compiler and settings (multithreading, debug/release, that
sort of thing)?
If the answer is no, we've got a candidate.

2) you said you did, but I _got_ to ask: did you check explicitly that
the manifest got incorporated? (I'm doing this off the top of my skull
right here and now, so I'm a bit fuzzy on the next /exact/ detail, but
here it is) This can be verified by opening the DLL in Visual Studio
or in a tool which can dump the resources for you: each DLL should
actually carry an RT_MANIFEST (fuzzy bit: it's an RT_*something*
resource you got to find). I've seen it happen that mt was invoked but
the manifest didn't make it into the DLL anyway; the conditions at the
time are lost in the mysts of my fuzzy brain, sorry.
Anayway, got to ask, as it's a real nasty, see next item:

3) Given the way OpenEXR is built, using the CreateDLL tool, #2 is a
prime candidate when you didn't apply it AFTER the CreateDLL has
REGENERATED the DLL: I wrote that in caps as that's what CreateDLL is
actually doing under the hood: re-running the link phase with a
tailored DEF/export file.
In other words: if your build process turns out to be:

- regular MSVC link phase
- mt integrate manifest into DLL
- CreateDLL invocation

you MUST swap those last two (edit the post-built action, for example)
or your manifest won't make it into the final DLL: that's where #2
(verification of RT_* resource existing in DLL actually used) comes up
again.

(And on an off note to myself: I should post my CreateDLL as it is
now; the bugger has been tested a lot now on 32 and 64 bit systems and
I promised I would do that about half a year back. There's a couple of
changes that might interest other folks..)

Anyway, closing off tonight (er, this morning): the easiest way out of
this conundrum I've found is to make ab-so-lu-te-ly bloody sure
e-ve-ry project [part] is built using the same compiler and project
settings, including the usual suspects MT/MD/et al (multithreading
yes/no, debug/release, you know the drill) but also stuff like
Exception handling are important to match.

And last but not least: did you check your binaries, EXE and DLLs
together, with the 'depends' tool (google that one if you haven't got
it yet; currently at v2.7-something if I recall correctly): that
bugger should NOT list any warnings or dependency errors unless you
are very sure about what you're doing (and just in case: playing the
delayed loading game is assuming you're exactly that, by the way ;-) )
and check your dll's don't happen to load ever so slightly different
MS RTL DLLs by /any/ chance.

On Fri, Jul 17, 2009 at 7:24 PM, Thomas Binder<thmsbinder <at> gmail.com> wrote:
> Hi,
>
> there are one or two threads around on this topic, they were of no
> help to me so far. Here is a short description of my problem:
>
> Setup:
>
> - I want/must use OpenEXR as dll with my own Windows XP 32 bit C++ application
> - I want/must use Visual Studio 2008 Standard Edition (VC9), SP1 is installed
> - I took the ilmbase 1.0.1, openexr 1.6.1 source code and converted
> the projects via the Visual Studio conversion wizardry
> - Was able to eliminate all undefined symbols, everything compiles and
> links fine.
>
> Problem:
>
> Consistent runtime error R6034 when loading OpenEXR dlls. Spelled out
> R6034 means that an application or dll has attempted to load the MSVC
> runtime without using a manifest.
>
> Indeed, my main application finds the runtime in
> C:\windows\winsxs\...., which is good, while the openexr dlls are
> looking in $PATH only. If I remove all MSVC*90.DLL from the path, the
> openexr dlls will not load.
>
> Remarks:
>
> I used mt.exe (manifest tool, unrelated to magnetic tape) to put the
> generated manifests into the dlls. Running mt works fine, and the XML
> is indeed incorporated into the dll. However, this does not change
> anything. Any dll is created via the createDLL linker wrapper, which I
> am currently looking at.
>
> Your input on this issue is really appreciated. The solution may be
> simple - my experience with things like this is limited.
>
> Thanks,
> Tom
>
>
> _______________________________________________
> Openexr-devel mailing list
> Openexr-devel <at> nongnu.org
> http://lists.nongnu.org/mailman/listinfo/openexr-devel
>
>

--

-- 
Met vriendelijke groeten / Best regards,

Ger Hobbelt

--------------------------------------------------
web:    http://www.hobbelt.com/
        http://www.hebbut.net/
mail:   ger <at> hobbelt.com
mobile: +31-6-11 120 978
--------------------------------------------------
Anders Egleus | 21 Jul 23:19
Picon

"baking" openExr into plugin dll

Hey there.

I'm using openExr in a plugin for Maya and I'm wondering if there's a
way to "bake" the exr libraries into my plugin dll (or mll as it
happens to be called in this case) so I don't have to distribute the
openExr dll files to every user.

I've successfully compiled both the exr libraries (following the
instructions in the readme files which come with the ilmbase and
openexr packages) and my own plugin and it's working fine as long as
the exr dll:s reside in my Maya bin directory. If I remove them
however, the plugin won't load (giving the error "the specified module
could not be found" of course). This is what I want to fix, i.e. I
want to be able to load my plugin without dependencies to the exr dll
files. Is this possible?

Let me make it clear that I'm very much a noob with all the linking
and preprocessor stuff, I've had a lot of help from this mailing list
as well as Hebbut's page in order to get this far. I believe that what
I want to do is called static linking, but I'm not sure.

If anyone has Maya (or not) and want to take a look at the vc++
project I'd be happy to upload it.

Thanks for any help.
Paul Miller | 21 Jul 23:41
Gravatar

Re: "baking" openExr into plugin dll

Anders Egleus wrote:
> I'm using openExr in a plugin for Maya and I'm wondering if there's a
> way to "bake" the exr libraries into my plugin dll (or mll as it
> happens to be called in this case) so I don't have to distribute the
> openExr dll files to every user.

You can do it but you'll have to build all of the EXR libs statically, 
then link against the static .lib files. This can be tricky to get right 
though.

Fortunately the only OpenEXR plugin I've written works with a standalone 
app I've written so I just bundle the EXR DLLs with it.

--

-- 
Paul Miller | paul <at> fxtech.com | www.fxtech.com | Got Tivo?
Wesley Smith | 22 Jul 02:07
Picon
Gravatar

Re: "baking" openExr into plugin dll

For these kinds of situations, I just build OpenEXR directly into my
project by including all of the source files.
wes

On Tue, Jul 21, 2009 at 2:41 PM, Paul Miller<paul <at> fxtech.com> wrote:
> Anders Egleus wrote:
>>
>> I'm using openExr in a plugin for Maya and I'm wondering if there's a
>> way to "bake" the exr libraries into my plugin dll (or mll as it
>> happens to be called in this case) so I don't have to distribute the
>> openExr dll files to every user.
>
> You can do it but you'll have to build all of the EXR libs statically, then
> link against the static .lib files. This can be tricky to get right though.
>
> Fortunately the only OpenEXR plugin I've written works with a standalone app
> I've written so I just bundle the EXR DLLs with it.
>
> --
> Paul Miller | paul <at> fxtech.com | www.fxtech.com | Got Tivo?
>
>
>
> _______________________________________________
> Openexr-devel mailing list
> Openexr-devel <at> nongnu.org
> http://lists.nongnu.org/mailman/listinfo/openexr-devel
>
Anders Egleus | 22 Jul 10:43
Picon

Re: "baking" openExr into plugin dll

Hey thanks paul :)

I thought about doing that, but I realized I wouldn't know where to
begin to troubleshoot if anything went wrong, so I decided to take the
path a lot of others seem to be taking (using static libraries).

It seems I haven't really gotten the hang of mailing lists so a lot of
the replies in this thread didn't make the mailing list/archive, so
I'm just sending another mail summarizing the discussion. Sorry for
the inconvenience.
Anders Egleus | 22 Jul 11:02
Picon

Re: "baking" openExr into plugin dll

2009/7/22 Anders Egleus <andersegleus <at> gmail.com>:
> Hey thanks paul :)
>
Sorry, I meant Hey thanks Wes and Paul :)
Anders Egleus | 22 Jul 11:04
Picon

Re: "baking" openExr into plugin dll (thread discussion summary)

It seems I haven't really gotten the hang of mailing lists so a lot of
the replies in this thread didn't make the mailing list/archive, so
I'm just posting this to summarize the discussion (first post at the top),
since it seems like a lot of useful info if other people have the same problems.
Sorry for the inconvenience.

2009/7/21 Anders Egleus <andersegleus <at> gmail.com>:
> Hey there.
>
> I'm using openExr in a plugin for Maya and I'm wondering if there's a
> way to "bake" the exr libraries into my plugin dll (or mll as it
> happens to be called in this case) so I don't have to distribute the
> openExr dll files to every user.
>
> I've successfully compiled both the exr libraries (following the
> instructions in the readme files which come with the ilmbase and
> openexr packages) and my own plugin and it's working fine as long as
> the exr dll:s reside in my Maya bin directory. If I remove them
> however, the plugin won't load (giving the error "the specified module
> could not be found" of course). This is what I want to fix, i.e. I
> want to be able to load my plugin without dependencies to the exr dll
> files. Is this possible?
>
> Let me make it clear that I'm very much a noob with all the linking
> and preprocessor stuff, I've had a lot of help from this mailing list
> as well as Hebbut's page in order to get this far. I believe that what
> I want to do is called static linking, but I'm not sure.
>
> If anyone has Maya (or not) and want to take a look at the vc++
> project I'd be happy to upload it.
>
> Thanks for any help.
>

2009/7/21 Michael Wolf <michael.wolf <at> db-w.com>:
>
> You'd want to link with a static link library for that (unlike a DLL which is a Dynamic Link Library) . We're
using one for our exr plugin for LW which is also distributed as a single file.
>
>
> You need to change the OpenEXR project.
>
> Here's a short (and probably incomplete) description:
>
> * Open OpenEXR.sln
> * Kick out makelib
> * In the properties of: half, Iex, IlmImf, IlmThread, Imath change General->Project
Defaults->Configuration Type to Static Library(.lib)
> * In the properties of all projects, change C/C++->Code Generation->Runtime Library to a non-DLL
version (otherwise you'll still need to ship with the msvc runtime DLLs).
>
> Build
> In your Maya plugin project, also change the runtime library to a non-dll version.
> Link with the OpenEXR Libs as before.
>
> That should be it unless I forgot something...
>

2009/7/21 Paul Miller <paul <at> fxtech.com>:
>
> You can do it but you'll have to build all of the EXR libs statically, then
> link against the static .lib files. This can be tricky to get right though.
>
> Fortunately the only OpenEXR plugin I've written works with a standalone app
> I've written so I just bundle the EXR DLLs with it.
>

2009/7/21 Anders Egleus <andersegleus <at> gmail.com>:
(in reply to 2009/7/21 Michael Wolf <michael.wolf <at> db-w.com>:)
> Hi Michael!
>
> Thanks for the quick reply :)
>
> Your suggestions seem pretty straightforward and vc++ - adapted, which is
> exactly what I needed, cheers for that :)
>
> There's only one step that confuses me:
>
>> * Kick out makelib
>
> I didn't find anything in any solution with that name. I'm using the 1.6.1
> version of OpenExr and the 1.0.1 version of IlmBase.
>
> Thanks in advance.
>
> Anders.
>

2009/7/21 Michael Wolf <michael.wolf <at> db-w.com>:
>
> That may be from an older version then. Basically, if any of the .bat files that are run during the compile
screw up... disable them :)
>
> Cheers,
> Mike
>

2009/7/21 Anders Egleus <andersegleus <at> gmail.com>:
(in reply to 2009/7/21 Paul Miller <paul <at> fxtech.com>:)
> Thanks Paul :)
>
> That's my escape plan If I don't get the static linking to work, and it's
> fine to have the dlls there while I develop. I just like to keep things
> clean and slim, plus then I don't have to worry about people having the
> right dlls in the bin folder for future versions of exr.
>
>

2009/7/22 Anders Egleus <andersegleus <at> gmail.com>:
(in reply to 2009/7/21 Michael Wolf <michael.wolf <at> db-w.com>:)
> Hi again Mike.
>
>> That may be from an older version then. Basically, if any of the .bat
>> files that are run during the compile screw up... disable them :)
>
>
> Sorry for my disgraceful noobness, but  [blushing]...
>
> how do I do that?
>
>
>

2009/7/22 Michael Wolf <michael.wolf <at> db-w.com>:
> On Wed, 22 Jul 2009 00:04:39 +0200, Anders Egleus <andersegleus <at> gmail.com> wrote:
>
>
> They are usually in the properties for a project, post-build actions and the like. You can just exclude
them from the build (which, as all these settings, is for the current Configuration only, i.e.
Release/Debug etc...).
>
> Cheers,
> Mike
>

2009/7/22 Anders Egleus <andersegleus <at> gmail.com>:
> Ok, I get it now :) Thanks
>
> I compiled IlmBase statically according to your suggestions, and the
> libraries seemed to compile without errors (and the .lib files are much
> larger now) so I guess that's a good sign. The test projects didn't compile
> error free, but I guess that's to be expected, and hopefully nothing to
> worry about. So on to OpenExr and the ilmImf lib...
>
> Thanks a million for all the help, I'll let you know how it goes.
>
>

2009/7/22 Michael Wolf <michael.wolf <at> db-w.com>:
> On Wed, 22 Jul 2009 00:26:34 +0200, Anders Egleus <andersegleus <at> gmail.com> wrote:
>
> Hi Anders,
>
>
> You're welcome. And don't forget the C/C++ language->runtime library option will need to be the same for
all binaries (your plugin and the .lib files you're just creating) - otherwise you'll be bombarded with
linker errors.
>
> Cheers,
> Mike
>

2009/7/22 Anders Egleus <andersegleus <at> gmail.com>:
> Well, everything seems to be working, except I still need to distribute the
> zlib1.dll file, but I guess I could try to do a static build of that too,
> right? Do you remember if you did that too for your LW plugin?
>
> Also, the plugin is working funcionality-wise, but debugging seems not to be
> working anymore (I get "no symbols have been loaded" when I attach vc++ to
> maya and set a breakpoint). But I guess that's no problem since I should be
> able to do a static build for the release version and a dynamic build for
> the debug version as long as I'm consistent right? Like I said before, I
> don't mind distributing the dlls to myself for debugging :)
>
> Once again, many many thanks for the help, cheers :)
>
> Anders
>
>

2009/7/22 Michael Wolf <michael.wolf <at> db-w.com>:
> On Wed, 22 Jul 2009 01:05:26 +0200, Anders Egleus <andersegleus <at> gmail.com> wrote:
>
>
> Yes, It's the same procedure.
>
> You can change the debug builds to be static as well.
>
> Great to hear it's working!
>
> Cheers,
> Mike
>
>

2009/7/22 Wesley Smith <wesley.hoke <at> gmail.com>:
(in reply to 2009/7/21 Paul Miller <paul <at> fxtech.com>:)
> For these kinds of situations, I just build OpenEXR directly into my
> project by including all of the source files.
> wes
>

2009/7/22 Anders Egleus <andersegleus <at> gmail.com>:
> Hey thanks paul :)
>
> I thought about doing that, but I realized I wouldn't know where to
> begin to troubleshoot if anything went wrong, so I decided to take the
> path a lot of others seem to be taking (using static libraries).
>

2009/7/22 Anders Egleus <andersegleus <at> gmail.com>:
> Sorry, I meant Hey thanks Wes and Paul :)
>

Gmane