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

2 vues (au cours des 30 derniers jours)
Ahmed Deiaa
Ahmed Deiaa le 20 Août 2017
Modifié(e) : Ahmed Deiaa le 20 Août 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.

Réponses (0)

Catégories

En savoir plus sur MATLAB Algorithm Acceleration dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by