필터 지우기
필터 지우기

parsing errors in loadlibrary in win 64

조회 수: 3 (최근 30일)
S
S 2011년 4월 26일
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

채택된 답변

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 C Shared Library Integration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by