Is it possible to interface Matlab with a C++ library through WSL?
2 次查看(过去 30 天)
显示 更早的评论
I have been given a C++ library which has been designed to work only on Linux and must be interfaced with existing Matlab code.
I have achieved it on a Ubuntu machine with no major issues, but it would be desirable if it could be run on Windows. The library itself works flawlessly on WSL2, so I was wondering if there is a way to make a Matlab running on Windows work with a library that must be executed on WSL.
Thank you.
0 个评论
回答(1 个)
Sugandhi
2023-2-17
Hi Frios,
I understand that you want to know the way to interface MATLAB with a C++ library that is executed on WSL.
Absolutely, it is feasible to accomplish this. Direct calls to C and C++ library functions are possible from MATLAB. You can utilise those classes and functions directly in MATLAB if your shared library is written in C or C++ and exports functionality that can be used from another programme. In order to access the functionality in MATLAB, you must first create an interface to the library. The interface can be packaged and sent to MATLAB end users.
For more information kindly go through the following links –
To build an interface to the library -
To use prebuilt MATLAB interface to C++ Library -
To write C++ Functions Callable from MATLAB (Mex Files) -
More about calling C++ from MATLAB -
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!