The following code will terminate during calling c_func() on Java. It does not occur if tuple is not used. I guess JNA does not support C++11 because tuple type is introduced on it. Is my guess correct?
C++ code
#include <tuple>
#include <map>
int c_func(){
static std::map< std::tuple<float, float, float>, float> mapOfTuple;
return 1;
}
Java code
...
public interface CLibrary extends Library {
public static final String JNA_LIBRARY_NAME = "test";
...
}
public static void main(String[] args) {
c_func();
}
JNA works at the interface level, not the implementation level. It doesn't even know that you used C++11 in c_func
. However, your C++ function probably has a dependency on a C++11 runtime library, which may be the problem.