|
From: Jim S. <ni...@ab...> - 2000-12-12 00:59:52
|
Jim Mason wrote: > > Paul, > > In your recent remarks you suggested several compile > options associated with the construction of DLLs in the > context of JNI. Among them: > > > a) verify that your mingw app is being compiled with -mthreads > > (this provides a level of thread safety that doesn't exist when - > > mthreads is not used) > > > > b) verify that your mingw app also has the -fvtable-thunks > > enabled (this is to insure that the COM stuff is being > > initialized properly) > > > > c) verify that you have -fnative-structs defined > > 1. Do these options seem to you as reasonable defaults for the > construction of any DLL for use with java? For simple JNI DLLs I haven't needed any of those options. > > 2. Put differently, is there any reason not to use these as > defaults for the construction of a JNI-implementing > DLL? Yes. See below. > > 3. I certainly understand the implication of the > "-fnative-structs" option, but can you be a little more > specific about what is provided by "-mthreads" and > "-fvtable-thunks". For example, if I used "-mthreads" > by default, am I simply giving up a little performance > for the sake of prudence, or is there rather more to > it? I can't speak for -mthreads, but the '-fvtable-thunks' option isn't JNI-related at all. It is strictly a COM requirement. Jim S. |