I have a library and some head files, no c++ source code, I want to use it with python.
I tried py++, but gccxml report error.
I tried swig, but some many “undefined symbol” errors.
Are there some smart tools can do such things automatically?
I have a library and some head files, no c++ source code, I want
Share
You could try using boost python
You’d need to create a simple wrapper dll that links to your original library, containing code similar to this (assuming you wanted to export a class called LibraryClass with 2 functions, foo & bar)
You might be able to use the automatic code generator to read the C++ definitions in the header files and do the hard work for you, but according to the boost python page this is no longer maintained, so I’m unsure how well it works.