Hi Nandita, Yes, as documented in the release notes, gcc after about gcc-3.2 does not work with JNI under Windows. The problem might be more specific to the version of cygwin. Elaine Cheong and I spent some time trying to get JNI to work with a gcc-3.4.x version of cygwin and I don't think we really succeeded. (Now that I think about it, we were able to run Viptos using JNI, so maybe we got something to work.) One issue is that the Matlab interface will fail if a Matlab model is loaded after Ptolemy has been running for awhile. Sadly the Java process exits.
The Ptolemy/Matlab interface uses JNI, thus the problem under Windows with cygwin and gcc. Zoltan Kemenczy recently wrote: > I haven't had the chance to try this with ptolemy/matlab, but I recently > 'discovered' how to build dlls with the latest gcc version (e.g. 3.4.4): > > Use '-mno-cygwin -shared' as parameters to gcc for compilation and > linking. I was able to build matlab (7.1 sp3) extension dlls using > these. > > I hope this will solve the ptolemy/matlab issue as well. Please let me = > know either way. I'm fairly certain Elaine and I tried -mno-cygwin -shared and it did not work for us. I have not had a chance to look further into this. There are several possible solutions: 1) Use a compiler other than gcc. The dll that we ship with Ptolemy II 5.0.1 was compiled with Microsoft Visual Studio and seems to be more stable. I think I've seen it crash though. The dll is in the 5.0.1 windows installer and can be found at http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII5.0/ptII5.0.1/bin/ptmatlab.dll 2) Use gcc-3.2 and the corresponding cygwin. This is what we shipped with Ptolemy II 3.0. However, it presumably has security issues because it is so old. See http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII3.0/cygwin.htm 3) Figure out how to get JNI to _reliably_ work with Cygwin. The best I've heard is that it might be necessary to create a program that launches java for you and then loading will work. There is a good writeup at http://elliotth.blogspot.com/2005/08/porting-jni-code-to-win32-with-cygwin.html I'd like to get around to this, but am swamped with other tasks. I think JNI issue is also blocking Viptos. I'm concerned that there could be problems using JNI with Ptolemy images that have been running for more than a few minutes. One quick way to test JNI this is to run the tests in $PTII/jni/test. If those test don't pass, then the odds of the Matlab interface working are very low. _Christopher -------- hi there, I am currently using gcc version 3.4.4 with cygwin. Is that version known t o be compatible with the Ptolemy Matlab interface? Currently running make under ptolemy/matlab gives gcc: no input files error . ( i am in middle of downloading cygwindevel.exe but unsure if gcc version with that cygwin installation is 3.2 or not) I have matlab 6.5 installed (WIndows os) thanks! nandita. -------- ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]