"Errors parsing header file" when building interface C++ library
4 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Boris
2022 年 7 月 18 日
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.
回答 (1 件)
Lokesh
2024 年 2 月 26 日
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 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!