I am having difficulty loading the FrontPanel dll into matlab for use. I get the feeling that I am overlooking something fundemental, but I have not been able to figure out a solution.
When I try to load the front panel library using loadlibrary as set out in the sample code, I first get parsing errors when setting up the preprocessed c file (okFrontPaneldll.i). The first several lines are:
[INDENT][I]Type ‘EXCEPTION_DISPOSITION’ was not found. Defaulting to type error.
Found on line 3229 of input from line 44 of file C:\Program Files (x86)\Microsoft Visual Studio 8\VC\INCLUDE\excpt.h
Failed to parse type ‘void * __ptr64 PVOID64’ original input ‘void * __ptr64 PVOID64’
Found on line 7366 of input from line 222 of file C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\winnt.h[/I][/INDENT]
It goes on in this vein for quite some time. Matlab then creates and compiles the thunk file (seemingly without error) and then fails as it tries to load it. The error it gives is:
[I][INDENT]??? Error using ==> loadlibrary at 480
There was an error loading the library “\projects…\API\Matlab\okFrontPanel.dll”
The specified module could not be found.
Error using ==> loaddefinedlibrary
The specified module could not be found.[/INDENT][/I]
When I open the thunk dll in Dependency Walker I get the following errors:
[INDENT]Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.[/INDENT]
I almost get the feeling this a problem with my c++ compiler (Visual Studio 2005 Standard Edition) and not the ok panel library, as the two dependencies listed are ntdll.dll and kernel32.dll (both x86 CPU) when I should have all the dependencies be x64 CPU (right?).
All of this is occuring using Matlab 2010a and a Windows 7 64bit operating system.
Any ideas? All comments and suggestions are greatly appreciated.