Why do I receive an error when accessing a shared object file via CALLLIB with MATLAB 7.0 (R14) on HP-UX or Mac?

1 view (last 30 days)
I am attempting to access a shared object file using the generic DLL interface functions. When I use CALLLIB to invoke some of this library's functions that take more than 5 input arguments, I receive the following error:
Too many inputs passed to SimpleFunctionThunk
When I use the equivalent Windows version of this library, I am able to access all the functions successfully.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 23 Dec 2009
Support for LOADLIBRARY function for 64-bit platforms was added in MATLAB 7.6(R2008a). For previous releases, please read the following for possible workarounds:
MATLAB supports dynamic linking of external libraries on 32-bit MS-Windows systems and on 32-bit Linux systems. In MATLAB 7.2 (R2006a), a warning indicates when the LOADLIBRARY function is used on an unsupported platform:
Warning: Shared libraries are not supported on this platform. Functions that do not have a mexFunction signature may have unpredictable results.
As the warning message indicates, the generic shared library interface may or may not work on other platforms. One known limitation is that on HP-UX and Macintosh platforms, only functions with up to 6 integer or pointer inputs can work, and floating-point numbers cannot be passed by value. There are no workarounds.

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!