clibgen c++ on MacOS/MATLAB2019b cannot use standard library
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi all,
It works for super-basic code, but from the moment I need the slighest include from the standard library, e.g. iostream, it throws a bunch of errors when clibgen tries to parse the file.
For example, this simple code pulls one the official cpp example (and therefore theoretically works) and tries to compile it:
copyfile(fullfile(matlabroot,'extern','examples','cpp_interface','school.hpp'),'.','f')
clibgen.buildInterface("school.hpp") % buildInterface can be replace by generateLibraryDefinition it leads to the same error
and it leads to the error displayed in full at the end of this message.
I am on MacOSX12.3, on a MacBook Pro 2020 with an intel chip and latest Xcode (clang 13 I believe) using MATLAB 2019b
Does anyone has a workaround that issue?
Errors parsing header file.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/type_traits:581: type name is not
allowed.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/type_traits:581: type name is not
allowed.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/type_traits:581: identifier
"__is_same" is undefined.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/type_traits:590: type name is not
allowed.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/type_traits:590: type name is not
allowed.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/type_traits:590: identifier
"__is_same" is undefined.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/type_traits:491: incomplete type
is not allowed.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/type_traits:491: expected a ";".
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/type_traits:1009: type name is not
allowed.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/type_traits:1009: identifier
"__is_function" is undefined.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/tuple:1004: parameter pack "_Tp"
was referenced but not expanded.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/tuple:1023: parameter pack "_Tp"
was referenced but not expanded.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/type_traits:581: type name is not
allowed.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/type_traits:581: type name is not
allowed.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/type_traits:581: type name is not
allowed.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/type_traits:581: type name is not
allowed.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/type_traits:581: type name is not
allowed.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/type_traits:581: type name is not
allowed.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/type_traits:581: type name is not
allowed.
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/type_traits:581: type name is not
allowed.
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Build MATLAB Interface to C++ Library dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!