PicoScope 7 Software
Available on Windows, Mac and Linux
Code: Select all
loadlibrary('ps3000a.dll','ps3000aApi.h');
if ~libisloaded('ps3000a')
error('library ps3000a.dll or ps3000aApi.h not found') %check if the library is loaded
end
unitHandle = 0;
serial = blanks(40);
[status.open, unitHandle, serial] = calllib('ps3000a', 'ps3000aOpenUnit', unitHandle, serial)
status.close = calllib('ps3000a', 'ps3000aCloseUnit', unitHandle);
unloadlibrary('ps3000a');
Code: Select all
loadlibrary 'ps3000a.dll' 'ps3000aApi.h' addheader 'picoStatus.h';
Code: Select all
loadlibrary 'ps3000a.dll' 'ps3000aApi.h' addheader 'picoStatus.h' mfilename 'ps3000aMFile';
Code: Select all
loadlibrary('ps3000a.dll', @ps3000aMFile);
Code: Select all
[methodinfo, structs, enuminfo, ThunkLibName] = ps3000aMFile
Code: Select all
mex -setup
Code: Select all
Error loading library intermediate output follows.
The actual error is at the end of this output.
*********
Type 'u_int64_t' was not found. Defaulting to type error.
Found on line 6602 of input from line 796 of file C:\\Users\\mnle\\Desktop\\pico4424\\ps4000Api.h
*********
Error using loadlibrary (line 419)
Building PS4000_thunk_pcwin64 failed. Compiler output is:
cl -I"C:\Program Files\MATLAB\R2012b\extern\include" /W3
/D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0
/nologo -I"C:\Users\mnle\Desktop\pico4424"
-I"C:\Users\mnle\Desktop\pico4424" "PS4000_thunk_pcwin64.c" -LD
-Fe"PS4000_thunk_pcwin64.dll"
PS4000_thunk_pcwin64.c
C:\Users\mnle\Desktop\pico4424\ps4000Api.h(54) : error C2628: 'int64_t'
followed by '__int64' is illegal (did you forget a ';'?)
C:\Users\mnle\Desktop\pico4424\ps4000Api.h(54) : warning C4091: 'typedef ' :
ignored on left of '_Longlong' when no variable is declared
C:\Users\mnle\Desktop\pico4424\ps4000Api.h(794) : error C2146: syntax error :
missing ')' before identifier 'holdoff'
C:\Users\mnle\Desktop\pico4424\ps4000Api.h(794) : error C2081: 'u_int64_t' :
name in formal parameter list illegal
C:\Users\mnle\Desktop\pico4424\ps4000Api.h(794) : error C2061: syntax error :
identifier 'holdoff'
C:\Users\mnle\Desktop\pico4424\ps4000Api.h(794) : error C2059: syntax error :
';'
C:\Users\mnle\Desktop\pico4424\ps4000Api.h(794) : error C2059: syntax error :
','
C:\Users\mnle\Desktop\pico4424\ps4000Api.h(796) : error C2059: syntax error :
')'
PS4000_thunk_pcwin64.c(871) : error C2065: 'u_int64_t' : undeclared
identifier
PS4000_thunk_pcwin64.c(871) : error C2146: syntax error : missing ';' before
identifier 'p1'
PS4000_thunk_pcwin64.c(871) : error C2065: 'p1' : undeclared identifier
PS4000_thunk_pcwin64.c(872) : error C2275: 'PS4000_HOLDOFF_TYPE' : illegal
use of this type as an expression
C:\Users\mnle\Desktop\pico4424\ps4000Api.h(342) : see declaration of
'PS4000_HOLDOFF_TYPE'
PS4000_thunk_pcwin64.c(872) : error C2146: syntax error : missing ';' before
identifier 'p2'
PS4000_thunk_pcwin64.c(872) : error C2065: 'p2' : undeclared identifier
PS4000_thunk_pcwin64.c(875) : error C2065: 'p1' : undeclared identifier
PS4000_thunk_pcwin64.c(875) : error C2065: 'u_int64_t' : undeclared
identifier
PS4000_thunk_pcwin64.c(875) : error C2143: syntax error : missing ')' before
'const'
PS4000_thunk_pcwin64.c(875) : error C2100: illegal indirection
PS4000_thunk_pcwin64.c(875) : error C2059: syntax error : ')'
PS4000_thunk_pcwin64.c(876) : error C2065: 'p1' : undeclared identifier
PS4000_thunk_pcwin64.c(876) : error C2065: 'p1' : undeclared identifier
PS4000_thunk_pcwin64.c(876) : error C2065: 'p1' : undeclared identifier
PS4000_thunk_pcwin64.c(877) : error C2065: 'p2' : undeclared identifier
PS4000_thunk_pcwin64.c(878) : error C2065: 'p2' : undeclared identifier
PS4000_thunk_pcwin64.c(878) : error C2065: 'p2' : undeclared identifier
PS4000_thunk_pcwin64.c(878) : error C2065: 'p2' : undeclared identifier
PS4000_thunk_pcwin64.c(879) : error C2059: syntax error : ','
PS4000_thunk_pcwin64.c(879) : error C2146: syntax error : missing ')' before
identifier 'u_int64_t'
PS4000_thunk_pcwin64.c(879) : error C2146: syntax error : missing ')' before
identifier 'u_int64_t'
PS4000_thunk_pcwin64.c(879) : error C2065: 'u_int64_t' : undeclared
identifier
PS4000_thunk_pcwin64.c(879) : error C2059: syntax error : 'type'
Error in PicoMatlabStartSetup (line 5)
loadlibrary('ps4000','ps4000Api.h')
>>
Code: Select all
#ifdef WIN32
...
...
/* Define a 64-bit integer type */
#include
// Add this
#ifndef _WIN64
typedef int64_t __int64;
#endif
typedef uint64_t u_int64_t;