I have a 32-bit library I would like to use some functions from that use the ACE library (http://www.cs.wustl.edu/~schmidt/ACE.html). Central to the task of making this work is the initialization of the ACE library. From a DLL, this is done with a call to ACE::init(). There are a number of examples of doing this and I have done it with a number of other programs. In the WolframLibrary_initialize() routine, I call ACE::init() and it fails. I have also tried putting the ACE::init() into the DLLMain routine--no luck. Most of what the ACE::init() does is allocate a bunch of C++ objects and initialize a number of static global variables. Some simple stuff works, like just returning a string, or getting the arguments from the called function.
This is a Windows 7 machine with 64-bit OS. I have set my notebook to use a 32-bit kernel so that I can load my 32-bit library. It has a number of other 32-bit dependencies. I can think of a couple of things that might be going wrong:
- The WolframLibrary_initialize() is not happening in the same thread as the original Win32 LoadLibrary call.
- The 32-bit kernel does not have the %PATH% I think it does.
- There is something else I need to do to get a 32-bit DLL to load its dependencies (they are all in the same dir as the one I built).
- I need to build the library with something later then Visual C++ 6.0
- C++ static variable initialization is problematic with LibraryLink.