Error using loadlibrary --- fatal error: cstdint: No such file or directory
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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.
0 Kommentare
Antworten (1)
Siehe auch
Kategorien
Mehr zu Nonlinear Optimization finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!