This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Anyone using gcj in Cygwin with -mno-cygwin to make a DLL ?



I'm hoping there is at least one other person on the planet who wanted to do this :)


I have a pile of Java code that I'd like to build as a Windows DLL that is
callable from a Visual C++-built application.

I've got quite a bit of the resulting build torture test working. For example
I can call C++ code compiled with gcc from a Visual C++ program.
I can also call Java compiled with gcj from gcc-compiled C++.
Finally I can _build_ a DLL that should contain the entire required
call-chain, from the DLL entry point, through gcc C++, into Java via CNI.


However it crashes at runtime, inside the Microsoft C runtime library.

I'm thinking that something has to be done to get the Java runtime off the ground.
I do nothing explicit to make this happen in my code, so I doubt it is happening.
Wondering if I hook the DLLMain function and make the call to JvCreateJavaVM.


I'm going to try that next, but it'd be useful to hear from anyone who has
pulled off this stunt already. The closest I can find in Google searching is a
fellow who did something similar on MacOS X.


Thanks.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]