Error using loadlibrary --- fatal error: cstdint: No such file or directory

8 visualizaciones (últimos 30 días)
Amar
Amar el 28 de Jun. de 2021
Respondida: Yongjian Feng el 2 de Jul. de 2021
Hi,
I am trying to load a custom written '.so' library in MATLAB 2020b running on Ubuntu 18.04 using the 'loadlibrary' function. However, I get these errors:
Failed to preprocess the input file.
Output from preprocessor is:/usr/lib/tracker/libtracker.h:1:9: warning: #pragma once in main file
1 | #pragma once
| ^~~~
/usr/lib/tracker/libtracker.h:3:10: fatal error: cstdint: No such file or directory
3 | #include <cstdint>
| ^~~~~~~~~
compilation terminated.
I checked the gcc verison using '!gcc - v' and this is what I have
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/bin/gcc-10.2.0/libexec/gcc/x86_64-linux-gnu/10.2.0/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../gcc-10.2.0/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/bin/gcc-10.2.0 --enable-checking=release --enable-languages=c,c++,fortran --disable-multilib --program-suffix=-10.2
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.2.0 (GCC)
Also, I can load this library in python using ctypes on the same machine.
This is what we have in the top of the library header file:
#pragma once
#include <cstdint>
extern "C" {
....
...
}
Any help would be much appreciated.

Respuestas (1)

Yongjian Feng
Yongjian Feng el 2 de Jul. de 2021
This header file requires C++11.

Categorías

Más información sobre Nonlinear Optimization en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by