-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doesn't work on windows #9
Comments
I've hit this bug too. What I've done is modify this line in jnius_jvm_desktop.pxi as said on IRC:
After that it looks like the linker has some issues with it:
These are the additions I've made to the setup.py in order to try and comply with the needed reference for that function:
but no luck. |
This configuration worked for me: elif platform == 'win32':
cpu = 'i386' if sys.maxint == 2147483647 else 'amd64'
jdk_home = environ.get('JDK_HOME')
jre_home = environ.get('JRE_HOME')
cpu = 'i386' if sys.maxint == 2147483647 else 'amd64'
include_dirs = [ join(jdk_home, 'include'), join(jdk_home, 'include', 'win32')]
library_dirs = [ join(jdk_home, 'lib'), join(jre_home, 'bin', 'server') ]
extra_link_args = ['-Wl,-rpath', library_dirs[0]]
libraries = ['jvm'] After building, there is a file "jnius.pyd" which is the DLL, so rename it to "jnius.dll". |
I used this guidance in a pull request to get Windows working. Thanks! |
was trying to compile it with mingw and vc 2008, but even after adding the correct includes from the jdk (subdir "win32"), I get this error:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-Ic:\Program Files (x86)\Java\jdk1.7.0_05\include" "-Ic:\Program Files (x86)\Java\jdk1.7.0_05\include\win32" -IC:\Python27\include -IC:\Python27\PC /Tcjnius\jnius.c /Fobuild\temp.win32-2.7\Release\jnius\jnius.obj
jnius.c
jnius\jnius.c(961) : error C2373: 'JNI_CreateJavaVM': Neudefinition; unterschiedliche Modifizierer
c:\Program Files (x86)\Java\jdk1.7.0_05\include\jni.h(1938): Siehe Deklaration von 'JNI_CreateJavaVM'
The text was updated successfully, but these errors were encountered: