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

조회 수: 3 (최근 30일)
Ahmed Deiaa
Ahmed Deiaa 2017년 8월 20일
편집: Ahmed Deiaa 2017년 8월 20일
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.

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Algorithm Acceleration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by