Azzera filtri
Azzera filtri

parsing errors in loadlibrary in win 64

3 visualizzazioni (ultimi 30 giorni)
S
S il 26 Apr 2011
Using R2010a on 64 bit windows 7 I'm having trouble loading a library that I previously used successfully on Windows XP. I followed this advice:
... to set up Visual Studio and the SDK. In loadlibrary.m it initially failed on line 366:
[res,ccout]=system(preprocess_command);
Where the preprocess_command was:
"%VS90COMNTOOLS%..\..\VC\vcvarsall.bat" amd64>nul&cl -nologo -I"C:\Program Files\MATLAB\R2010a\extern\include" -E "C:\Program Files\Opal Kelly\FrontPanelUSB\API\Matlab\okFrontPanelDLL.h" > "okFrontPanelDLL.i"
... because it couldn't find cl (the c compiler). I got around this by adding its location:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64
... to the windows path. Thereafter it failed on line 384:
[parsemsg, status] = perl(prototypes, preprocfile, ['-outfile=' mfile_name],['-thunkfile=' thunkfilecname], perlopt{:});
With the following messages:
Warning: Warnings messages were produced while parsing. Check the functions you intend to use for correctness. Warning text can be viewed using: [notfound,warnings]=loadlibrary(...) > In loadlibrary at 399 In ... Error loading library intermediate output follows. The actual error is at the end of this output. *******
Type 'okDLLEXPORTvoidDLL_ENTRY' was not found. Defaulting to type error. Found on line 123 of input from line 122 of file C:\\Program Files\\Opal Kelly\\FrontPanelUSB\\API\\Matlab\\okFrontPanelDLL.h
... and so on, with one such error for each definition in the header file. The line of the header file to which the above error refers reads:
okDLLEXPORT void DLL_ENTRY okFrontPanelDLL_GetVersion(char *date, char *time);
... so without really understanding what it's doing, it looks to me like it's failing to understand the syntax and treating "okDLLEXPORT void DLL_ENTRY" without spaces, as a type definition.
I should note that prior to this point, the preprocessing line created a file called:
okFrontPanelDLL.i
... in a temporary directory, and this is the input to the above perl script. Inside that file, the line on which it's failing appears to be unchanged.
Any help would be greatly appreciated.
Thanks Sim

Risposta accettata

Chirag Gupta
Chirag Gupta il 26 Apr 2011
This is probably because on Win64 platforms for loadlibrary, MATLAB only supports the following compilers: http://www.mathworks.com/support/compilers/R2010a/win64.html

Più risposte (0)

Categorie

Scopri di più su C Shared Library Integration in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by