I'm developing an application that uses MagickWand. It calls genesis and terminus in main, so this isn't a problem within my application. However, my application takes plugins that handle specific functionality. The idea being that others would develop these modules. In one of my reference modules, I'd like to use MagickWand. This is where I'm having my problem. If I call Genesis and Terminus in my module init and finalize functions, I get this error:
Code: Select all
magick/semaphore.c:290: LockSemaphoreInfo: Assertion `semaphore_info != (SemaphoreInfo *) ((void *)0)' failed.
I'm assuming this is caused by a second call to Genesis.
This leaves me with an unpleasant choice: I can either not use MagickWand in my module, and try to use a different library and add an extra dependency, or I can use my knowledge that Genesis has been called in the main application and not worry about it. However, while that's an assumption that I can make, I can't expect that others have implementation details of my application.
Am I mising something? Am I just approaching this the wrong way? Any help is appreciated!