フィルターのクリア

Using a shared library without an installed compiler?

1 回表示 (過去 30 日間)
Marc
Marc 2013 年 10 月 18 日
回答済み: Marc 2013 年 10 月 23 日
Hello,
From Matlab, we are calling functions in a shared library via the loadlibrary function. That works fine.
The loadlibrary function however requires the user to provide a header file, and a compiler. Our customers do not all have a compiler installed, or are complaining if we request them to install a compiler in order to use our shared library. So my question is:
is there a way we can "do some preprocessing" (on our computer, with installed Matlab and compiler) so that a compiler is not needed anymore on the computer of our customers?
Thanks for any insight

採用された回答

Philip Borghesani
Philip Borghesani 2013 年 10 月 18 日
編集済み: Philip Borghesani 2013 年 10 月 18 日
Load the library on your machine using the mfilename option to loadlibrary then supply the generated prototype file and thunk library to your customers who can load the library with the command:
loadlibrary(@prototype_file)
This also results in much faster loading of the library.
See help on loadlibrary for more information on prototype and thunk files.

その他の回答 (1 件)

Marc
Marc 2013 年 10 月 23 日
Thanks a lot Philip,
that's exactly what I was looking for!

カテゴリ

Help Center および File ExchangeC Shared Library Integration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by