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

Ryan Livingston
Ryan Livingston am 28 Sep. 2020
I think you need to use the calllib function to invoke the function:
Giampaolo MOPA
Giampaolo MOPA am 2 Okt. 2020
Bearbeitet: Giampaolo MOPA am 2 Okt. 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

Antworten (0)

Diese Frage ist geschlossen.

Gefragt:

am 23 Sep. 2020

Geschlossen:

am 20 Aug. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by