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 <andersegl...@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.w...@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 <p...@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 <andersegl...@gmail.com>: (in reply to 2009/7/21 Michael Wolf <michael.w...@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.w...@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 <andersegl...@gmail.com>: (in reply to 2009/7/21 Paul Miller <p...@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 <andersegl...@gmail.com>: (in reply to 2009/7/21 Michael Wolf <michael.w...@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.w...@db-w.com>: > On Wed, 22 Jul 2009 00:04:39 +0200, Anders Egleus <andersegl...@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 <andersegl...@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.w...@db-w.com>: > On Wed, 22 Jul 2009 00:26:34 +0200, Anders Egleus <andersegl...@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 <andersegl...@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.w...@db-w.com>: > On Wed, 22 Jul 2009 01:05:26 +0200, Anders Egleus <andersegl...@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.h...@gmail.com>: (in reply to 2009/7/21 Paul Miller <p...@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 <andersegl...@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 <andersegl...@gmail.com>: > Sorry, I meant Hey thanks Wes and Paul :) > _______________________________________________ Openexr-devel mailing list Openexr-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/openexr-devel