"Errors parsing header file" when building interface C++ library
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
I am trying to build an C++ interface library on macOS (I already have the build on Linux working). When comes the time to call clibgen.generateLibraryDefinition I get the following error (the list goes on a bit more but the errors are the same).
Error using generateLibraryDefinition (line 45)
Errors parsing header file.
/Users/MY_USER_NAME/Library/Developer/Toolchains/LLVM11.1.0.xctoolchain/usr/include/c++/v1/type_traits:573:
type name is not allowed.
/Users/MY_USER_NAME/Library/Developer/Toolchains/LLVM11.1.0.xctoolchain/usr/include/c++/v1/type_traits:573:
type name is not allowed.
/Users/MY_USER_NAME/Library/Developer/Toolchains/LLVM11.1.0.xctoolchain/usr/include/c++/v1/type_traits:573:
identifier "__is_same" is undefined.
/Users/MY_USER_NAME/Library/Developer/Toolchains/LLVM11.1.0.xctoolchain/usr/include/c++/v1/type_traits:582:
type name is not allowed.
/Users/MY_USER_NAME/Library/Developer/Toolchains/LLVM11.1.0.xctoolchain/usr/include/c++/v1/type_traits:582:
type name is not allowed.
/Users/MY_USER_NAME/Library/Developer/Toolchains/LLVM11.1.0.xctoolchain/usr/include/c++/v1/type_traits:582:
identifier "__is_same" is undefined.
/Users/MY_USER_NAME/Library/Developer/Toolchains/LLVM11.1.0.xctoolchain/usr/include/c++/v1/type_traits:492:
incomplete type is not allowed.
/Users/MY_USER_NAME/Library/Developer/Toolchains/LLVM11.1.0.xctoolchain/usr/include/c++/v1/type_traits:492:
expected a ";".
Anyone knows how to fix that ?
1 commentaire
Boris
le 18 Juil 2022
Hi Damien, did you manage to solve your problem by any chance? I am having the very same problem, I am even trying with the official examples shipped with MATLAB but it just does not want the slighest include from the standard library.
See here my related question.
Réponses (1)
Lokesh
le 26 Fév 2024
Hi Damien,
I understand that you are facing errors when building a C++ interface library on macOS. The issue you are encountering is due to the "clibgen.generateLibraryDefinition" function failing when parsing some header files on macOS.
Please refer to the following documentation, which provides a potential workaround to resolve a similar issue:
0 commentaires
Voir également
Catégories
En savoir plus sur Use Prebuilt 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!