How to use a matlab dll in VS2010 (c++ project)?

1 view (last 30 days)
Sahba
Sahba on 21 Oct 2013
Hi everyone I'm quite new to use dll that has been compiled in matlab in other language I compiled a line_font.m in matlab R2013a with this command
mcc -W cpplib:MyLib -T link:lib line_font.m
I give below files as outputs
  • MyLib.lib
  • MyLib.dll
  • MyLib.h
  • MyLib.cpp
I submit the following setting in the c++ project:
  1. 1)Linker->Input->Additional Dependencies->MyLib.lib
  2. 2)Linker->General->Additional Library Directories->the address of a folder containing the MyLib.lib
  3. 3)c\c++->Additional Include Directories->C:\ProgramFiels\Matlab\R2013a\extern\Include
Still my program doesn't recognize the line_font function I searched the web but I couldn't have this problem resolved. Can any one give a working solution???

Answers (0)

Categories

Find more on C Shared Library Integration in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!