loadlibrary calls lcc by default

1 visualizzazione (ultimi 30 giorni)
sst
sst il 9 Nov 2011
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.

Risposta accettata

Kaustubha Govind
Kaustubha Govind il 9 Nov 2011
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

Più risposte (0)

Categorie

Scopri di più su Troubleshooting in MATLAB Compiler SDK in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by