ImportError when using ReferenceCount objects

Hello,

We’re currently trying to upgrade from panda3d 1.7.2 to 1.8.0 in our software, and we are now stuck with an issue we don’t really understand :

I have a C++ class that inherits from ReferenceCount, in order to make it compatible with panda smart pointers. The library is then compiled into a pyd library and imported from a python program.
It works fine with 1.7.2 in the “standalone” software as well as in the web plugin. With the 1.8.0 version, it still works perfectly in standalone program, but inside the plugin we get the following error :

ImportError: DLL load failed: Specified procedure could not be found

when using “import mylib”

Even the simplest class like :

class DummyClass : public ReferenceCount {
public:
PUBLISHED:
    DummyClass() : ReferenceCount()
    {
    }
    
    DummyClass(int dummyParameter) : ReferenceCount()
    {
        dummyVar = dummyParameter();
    }
    
    virtual ~DummyClass()
    {
    }
    
protected:
    int dummyVar;
};

seems to fail to be imported. However, using PNMImage (or some other classes) instead of ReferenceCount seems to work fine in this example.
I’ve read that it could be a wrong dll used somewhere, or a bad path, but I can’t figure out where to check.

Any ideas are welcome
Thanks,
Vash

You need to compile it differently for it to work with the plugin. Search around the forums; it probably involves some preprocessor flags like unsetting DO_MEMORY_USAGE and setting NDEBUG.