How to create a C shared library that contain Matlab GUI function, and how to call the function from visual studio 2008?

1 view (last 30 days)
Hello
I have created my own matlab GUI, and I also can compile simple functions into a C shared library from matlab. But I tried to compile a GUI into a C shared library, and call the GUI function from Visual studio 2008, it failed. The error logs show that "error LNK2001: unresolved external symbol _mclTerminateApplication_proxy...."
I don't know how to compile a GUI function into a C shared library from matlab, and how can the dll and lib files be used to run the same application (GUI) from Visual studio 2008. Is there a step by step procedure where I can read about it. Thanks.

Accepted Answer

Kaustubha Govind
Kaustubha Govind on 24 Oct 2011
This page has an example of compiling and building C shared libraries using MATLAB Compiler. Also, this page lists the files needed to use the compiled library outside of MATLAB (libmatrix is the library produced by the example in the first link). You will need to link your Visual Studio application against the .lib file generated by the MATLAB Compiler.

More Answers (0)

Categories

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

Products

Community Treasure Hunt

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

Start Hunting!