g++ -o vsmatrix.dll -shared -std=c++11 -Wall -Wextra -Wno-unused-parameter -O3 -g0 -Wl,--dll,--add-stdcall-alias vsmatrix.cpp
maybe, this is OK.
EDIT:
hmm, VSHelper.h does not consider about mingw.
Code:
@@ -32,6 +32,11 @@
#define inline _inline
#endif
+#ifdef __MINGW32__
+#define __MSVCRT_VERSION__ 0x0700
+#include <malloc.h>
+#endif
+
#ifdef _WIN32
#define VS_ALIGNED_MALLOC(pptr, size, alignment) *(pptr) = _aligned_malloc((size), (alignment))
#define VS_ALIGNED_FREE(ptr) _aligned_free((ptr))
you need this patch for VSHelper.h