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 CenterFile Exchange에서 Troubleshooting 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