Can I build shared library from native code (.so file, to be used in JNI) under Windows-(XP or 7)? If yes how ? What if it is NDK for Android?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can refer to this book: http://java.sun.com/docs/books/jni/html/jniTOC.html
Instructions for compiling a JNI shared library on Windows: http://java.sun.com/docs/books/jni/html/start.html#27008 (On Windows they use the extension .dll, not .so)
Update: Oracle has taken the above link down, but it can be viewed at http://web.archive.org/web/20110623094757/http://java.sun.com/docs/books/jni/html/start.html#27008
These instructions are for the Visual C++ compiler; if you use another compiler look up in its manual how to compile shared libraries.