??? Undefined command/function 'somma_init'.

I'm trying to create a DLL with Visual Studio, and then i'd like to use it in Matlab using the "loadlibrary('xxx.dll','xxx.h')".
The Dll seems correctly compiled in Visual Studio, and when i use the loadlibrary of Matlab, on the "command windows" nothing error appear.
But, when i call the function defined in the Dll, the error "??? Undefined command/function 'somma_init'.", has shown
Can you help me about this point?, I can share the code of Dll written in Visual studio.
thanks.

2 commentaires

Ryan Livingston
Ryan Livingston le 28 Sep 2020
I think you need to use the calllib function to invoke the function:
Giampaolo MOPA
Giampaolo MOPA le 2 Oct 2020
Modifié(e) : Giampaolo MOPA le 2 Oct 2020
Thanks so much Ryan, with use of Calllib function it work fine.
But now i have another problem with use of "libpointer".
I want that my DLL return an array of numbers for example:
Test=[12,32,1,54];
i tried to use the libpointer, but the return of DLL is a libpointer empty.
Can you give me e suggestion?
thanks

Réponses (0)

Cette question est clôturée.

Clôturé :

le 20 Août 2021

Community Treasure Hunt

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

Start Hunting!

Translated by