??? 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 Commenti

I think you need to use the calllib function to invoke the function:
Giampaolo MOPA
Giampaolo MOPA il 2 Ott 2020
Modificato: Giampaolo MOPA il 2 Ott 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

Risposte (0)

Questa domanda è chiusa.

Richiesto:

il 23 Set 2020

Chiuso:

il 20 Ago 2021

Community Treasure Hunt

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

Start Hunting!

Translated by