Call a generated .dll file from codegen matlab in c program

2 visualizaciones (últimos 30 días)
Ahmed Deiaa
Ahmed Deiaa el 20 de Ag. de 2017
Editada: Ahmed Deiaa el 20 de Ag. de 2017
I am using codegen in matlab R2016b to generate .dll file as follows:
codegen -config:dll ex_fun.m -args {0,0,0,0,0,0}
I have tried to include the dll file as a reference using visual studio 2015 but nothing works fine and I couldn't use the .lib file as a linker as well.
The strange thing is that i could easily use gcc on linux by compiling the .c script that just call the C function along with the output .so file (which is equivalent to .dll in windows) as follows:
gcc main.c ex_fun.so -Wl,-rpath=$(pwd)
However, I couldn't find any direct method in windows
So, how can I use and call the matlab output dll file in a .c main script program ?
It should be noted that a .def file is also generated but I don't how to use it along with the output dll file.

Respuestas (0)

Categorías

Más información sobre MATLAB Algorithm Acceleration en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by