I installed the 32 bit version of Mingw 4.7.2 (using the installer) on my Windows 7 64 bit. I use MinGW in an Eclipse C++ project in order to build a .dll file. So far everything works.
However I use this .dll to be included in a java project via JNI. And when I call a function of the .dll in the java project the exception "Exception in thread "main" java.lang.UnsatisfiedLinkError: D:\path\mylib.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform"
is thrown.
So it seem like I need to build an 64 bit version of the DLL.
So my questions are:
- Can I build an 64 bit DLL with MinGW 32 bit or do I need the MinGW 64 bit version for that?
- If yes how do I need to adjust the MinGW and/or Eclipse Settings to do so?
Regards Marc
Edit: As you can see in the comment below, I already tried to set the -m64 Flag to build a 64 bit dll. This results in the error: "sorry, unimplemented: 64-bit mode not compiled in"
.
So is there a way to get the 64 bit mode running in mingw32.