This doesn’t seem to be a problem with front panel as such, but all the same I can’t use my xem3010 any more until I resolve it.
Using 64-bit MATLAB R2010a on windows 7 I’m having trouble loading the okfrontpaneldll that I previously used successfully on Windows XP with 32-bit matlab R2010a.
The dll is from the installation of frontpanel version 4 (understanding that I need to upgrade in order to work with 64 bit windows), but I get the same problem with the dll from version 3.011, which loaded fine on my old computer.
I followed this advice:
… to set up Visual Studio and the SDK. In MATLAB’s 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