"Couldn't find function symbol in library" - JS-Ctypes
===

My C++ Library function is `int RFD_startBackgroundThread()`
My code in the `overlay.js` is

    uri = addon.getResourceURI("components/mac/libReverbFirefoxExtensionLib.dylib");
    this.extensionLib = ctypes.open(uri.path);
    this.startBackgroundThread = this.extensionLib.declare("RFD_startBackgroundThread", ctypes.default_abi, ctypes.unsigned_int);

The code throws an exception on the last line. It says "`Couldn't find function symbol in library`".

The library is a "fat dylib binary" combining both i386 and x86_64 (but not PPC arch) on OS X Lion (10.7). Firefox version 11.

Desperately need help.
Thanks.
Rahul.