STL map in Perl using SWIG

I put your C++ function into header file as an inline function for testing. I was then able to construct a SWIG interface that does what you are looking for. It has two key parts. Firstly I wrote a typemap that will allow either a std::map, or a perl hash to be given as input … Read more

Exposing a C++ API to Python

I’ve used both (for the same project): Boost is better integrated with the STL, and especially C++ exceptions. Also, its memory management mechanism (which tries to bridge C++ memory management and Python GC) is way more flexible than SWIG’s. However, SWIG has much better documentation, no external dependencies, and if you get the library wrapped … Read more

cc1plus: warning: command line option “-Wstrict-prototypes” is valid for Ada/C/ObjC but not for C++

I can answer part of the question, why you’re getting the message. Something in your build process is invoking gcc on a C++ source file with the option -Wstrict-prototypes. For C and Objective-C, this causes the compiler to warn about old-style function declarations that don’t declare the types of arguments. For C++, this option doesn’t … Read more

Python: SWIG vs ctypes

I have a rich experience of using swig. SWIG claims that it is a rapid solution for wrapping things. But in real life… Cons: SWIG is developed to be general, for everyone and for 20+ languages. Generally, it leads to drawbacks: – needs configuration (SWIG .i templates), sometimes it is tricky, – lack of treatment … Read more

java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader

I am currently working on an Android application which streams radio. I use native decoder library which is called aacdecoder. Everything was fine till app gets crash error on some Android devices. It was really annoying. Because app was perfectly plays radio streams almost all devices but Samsung S6 and S6 Edge. Crash report says … Read more