I'm having difficulties with generating a MATLAB interface to a C++ library GitHub - ORNL/TASMANIAN: The Toolkit for Adaptive Stochastic Modeling and Non-Intrusive ApproximatioN. I'm using Ubuntu 22.04.3 LTS and MATLAB version 2023a. First, I build the Tasmanian library with CMake and GCC 11 and install it to a custom directory, which generates the header files in <install_dir>/include directory and library .so files in <install_dir>/lib directory. I then run the clibPublishInterfaceWorkflow function and in the Generate C++ Interface section select all the header files and .so files. When I click on Generate definition file, it prints "MEX configured to use 'g++' for C++ language compilation.", runs for some time, but exits with several errors like:
/usr/include/c++/11/bits/basic_string.h(6064):
error: declaration of function template "std::__cxx11::basic_string" had a different meaning during compilation of "<install_dir>/include/Tasmanian.h" (template types do not match)
or
/usr/include/c++/11/array(267):
error: declaration of function template "std::array" had a different meaning during compilation of "<install_dir>/include/Tasmanian.h" (template types do not match)
I can confirm that issues with multiple header files are not there on Windows either with mingw81 or Visual C++ 2022. However, I still haven't succeeded in generating the interface as Matlab taskes up more than 12GB of RAM and crashes (my system has 16GB, but apparently it's not enough). I'll open another thread for this issue.
Da Änderungen an der Seite vorgenommen wurden, kann diese Aktion nicht abgeschlossen werden. Laden Sie die Seite neu, um sie im aktualisierten Zustand anzuzeigen.
Translated by
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.