After using C + + to implement some algorithm functions, there is an error when calling Python:
AttributeError: /..../libHessian4Nii.so: undefined symbol: callVesselSegNii
According to Du Niang, it is because the function name will be renamed in the C + + compiled file (which is convenient to realize the overload function), so the function name cannot be found when calling the script.
The solution is to use extern “C” Just enclose the header file to be exposed. Examples are as follows:
extern "C"{
int callVesselSegNii(char* oriNiiFile, char* maskNiiFile, char* save_path);
}
After recompilation, call the normal!!!!
Read More:
- Python calls DLL and reports an error windowserror: [error 126]
- Error: l6218e: undefined symbol appears when keil calls lib
- [OpenGL · error] visual studio 2019 reports an error. It is an external symbol gladloadglloader that cannot be parsed. This symbol is referenced in the function main
- Solutions to the problem of “symbol lookup error xxxxx, undefined symbol”
- The springboot integration CXF calls WebService and reports an error: cannot create a secure xmlinputfactory
- How to generate lib library with keil MDK and use lib Library
- Hadoop reports an error. Cannot access scala.serializable and python MapReduce reports an error
- Chinese garbled code when vscode calls CMD to run C / C + +
- Failed to dlsym make_device: undefined symbol: make_device
- Arduino reports an error when writing a custom library file to solve the problem of not name of type, not declared in this scope
- chattr: symbol lookup error: chattr: undefined symbol: fsetproject
- Unit Android converts c# class to JSON file and reports an error
- The C language qsort() function reports an error for overflow of – 2147483648 and 2147483648
- How to generate PDF by C #
- Undefined symbol: cblas appears after installing pytorch1.0.0_ sgemm_ Alloc error
- Error from Python installation Library: Microsoft Visual C + + 14.0 is required
- Imshow() reports an error after C + + opencv 4.5.1 configures the environment
- The python script tool of ArcGIS reports an error: indentationerror: unexpected indent solution
- C++ compiler prompt “undefined reference to…”[How to Fix]
- HTML method IE8 reports an error, IE8 jQuery Ajax obtains static resources reports an error, typeerror denies access