Question
I am developing a C++ application, which connects and interfaces with MATLAB via the C++ Engine API. When calling "findMATLAB()" in the C++ code, a segmentation fault occurs. Thread 1 received signal SIGSEGV, Segmentation fault.0x0000000000000000 in ?? ()(gdb) I suspect that this may be due to a mismatch between my compiled version of "tbb.dll" and the MATLAB version. Can this be the cause of the crash?
Related Questions
Expert Answer
John Michell
PhD Expert
Answered Aug 27, 2026
The "tbb.dll" library is a threading library developed by Intel and shipped with MATLAB. A mismatch between the version of the "tbb.dll" library in your application and the one shipped with MATLAB could cause a segmentation fault.
When developing C++ applications that interface with MATLAB Engine and require functions from this library, it is recommended to use the version of "tbb.dll" that ships with MATLAB to avoid this library conflict.
To invoke the MATLAB version of "tbb.dll" during runtime, you will need to hide other versions of "tbb.dll", so only the MATLAB version is visible to the C++ application. Since the header files of "tbb.dll" are not shipped with MATLAB, you will need to get the corresponding header files from Intel for compilation. Be sure to download the relevant header files from Intel that correspond to the MATLAB version of "tbb.dll". Version information for "tbb.dll" can be found by the following command in Windows PowerShell:
get-command "" | format-list
Have a different question? Ask here