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

2 visualizzazioni (ultimi 30 giorni)
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.

Risposte (0)

Categorie

Scopri di più su MATLAB Algorithm Acceleration in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by