loadlibrary calls lcc by default

2 vues (au cours des 30 derniers jours)
sst
sst le 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.

Réponse acceptée

Kaustubha Govind
Kaustubha Govind le 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

Plus de réponses (0)

Catégories

En savoir plus sur C Shared Library Integration dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by