Error loading VISA framework into MATLAB (MacOS)
Show older comments
I am trying to load VISA (Mach-O executable) into MATLAB and I get the following errors. Another question on this community has answered how to deal with some of the errors but my main error is with compiling the thunkfile.
loadlibrary('/Library/Frameworks/VISA.framework/VISA','/Library/Frameworks/VISA.framework/Headers/visa.h','includepath','/Library/Frameworks/VISA.framework/Headers','mfilename','visaprototype.m')
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
Error loading library intermediate output follows.
The actual error is at the end of this output.
*********
Failed to parse type 'union { char *__mbstate8; long long _mbstateL ; } __mbstate_t' original input 'union { char __mbstate8 [ 128 ]; long long _mbstateL ; } __mbstate_t'
Found on line 86 of input from line 79 of file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/i386/_types.h
Type '__mbstate_t' was not found. Defaulting to type error.
Found on line 88 of input from line 81 of file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/i386/_types.h
Error parsing argument for function viQueryf function may be invalid.
*********
Error using loadlibrary
Building VISA_thunk_maci64 failed. Compiler output is:
/usr/bin/xcrun -sdk macosx10.12 clang -I"/Library/Frameworks/VISA.framework/Headers"
-I"/Applications/MATLAB_R2016b.app/extern/include" -fno-common -arch x86_64 -mmacosx-version-min=10.9 -fexceptions -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
-I"/Users/mathewsTHI/Documents/MATLAB" -I"/Library/Frameworks/VISA.framework/Headers" "VISA_thunk_maci64.c" -o
"VISA_thunk_maci64.dylib" -bundle
VISA_thunk_maci64.c:321:4: error: array type 'ViVAList' (aka '__builtin_va_list') is not assignable
p2=*(ViVAList const *)callstack;
~~^
VISA_thunk_maci64.c:339:4: error: array type 'ViVAList' (aka '__builtin_va_list') is not assignable
p3=*(ViVAList const *)callstack;
~~^
2 errors generated.
I know the VISA library is working because I am able to use it using Xcode. From the documentation on load library I understand that a thunk file is created for compatibility with a 64 bit architecture. However, the VISA library has two different architectures I can use. Will forcing load library to look at one architecture help? If so, how do I go about doing it?
Answers (0)
Categories
Find more on Data Types in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!