loadlibrary calls lcc by default

1 回表示 (過去 30 日間)
sst
sst 2011 年 11 月 9 日
Hi, I am using R2010b SP1 running on Windows XP Professional SP3 (32 bit). I am trying to use loadlibrary to access a DLL within MATLAB. I have run mex -setup and set up MATLAB to use Microsoft Visual C++ 2010 Express. However, when I try executing the loadlibrary command, I get a message saying "lcc preprocessor error" indicating that it is trying to call lcc. Is that supposed to be the default behaviour? The supported compilers page indicates that Visual C++ 2010 Express is fully supported.
Thanks.

採用された回答

Kaustubha Govind
Kaustubha Govind 2011 年 11 月 9 日
Yes, I believe in R2010b and earlier versions, the use of LCC to parse symbols is the default behavior of LOADLIBRARY. However, in R2011a, LOADLIBRARY started honoring the compiler chosen with "mex -setup". If you do not plan to upgrade, you can try first running the MSVC preprocessor on your header file to produce the corresponding .i file, and then provide that in place of the header to LOADLIBRARY, so that the preprocessor is not run.
You should be able to run the MSVC pre-processor on your header with this command from the Visual C++ command window:
cl myheader.h /P

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTroubleshooting in MATLAB Compiler SDK についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by