This is the mail archive of the
mailing list for the Cygwin project.
RE: Using cygwin and JAVA/JNI
- From: "Mike Bresnahan" <mbresnah at visi dot com>
- To: <cygwin at cygwin dot com>
- Date: Wed, 5 Feb 2003 22:52:17 -0800
- Subject: RE: Using cygwin and JAVA/JNI
I have been using Cygwin GCC 3.2 to build JNI DLLs that use <iostream>
without difficulty. I have done the following things:
- put -mno-cygwin -D_REENTRANT -D_GNU_SOURCE -D__int64="long long" on the
compiler command line
- put -mno-cygwin -Wl,--add-stdcall-alias on the linker command line
See the Cygwin FAQ at http://cygwin.com/faq/faq.html for info
> -----Original Message-----
> From: email@example.com [mailto:firstname.lastname@example.org]On Behalf
> Of Alan Thompson
> Sent: Wednesday, February 05, 2003 8:18 PM
> To: email@example.com
> Subject: Using cygwin and JAVA/JNI
> >Hi all - I have been doing some JNI stuff to integrate our
> legacy software, and I have had very good luck following the
> examples at http://www.inonit.com/cygwin/jni/helloWorld/ . The
> only twist is that I've been using g++ instead of gcc, which
> simplifies the non-java part.
> >Here's a question, though: I cannot for the life of me figure
> out how to use the C++ <iostream> in any of the code! For some
> reason, the "-mno-cygwin" flag kills the ability of g++ to either
> compile or link any code referring to <iostream>. This means one
> is stuck using good old printf(), instead of the more modern way.
> No matter how I break up the complies, it still fails at the
> linking stage (when -mno-cygwin is still required, according to
> my experiments).
> >Does anyone have any ideas? Also, I've been unable to find any
> documentation on the -mno-cygwin flag in the gcc/g++ man pages.
> Can anyone point me to where this comes from and/or is documented?
> >Thanks again for all of the help,
> >Alan Thompson
> >P.S. I've been using Cygwin for quite a while now ant it's
> fantastic when you're chained to a windoze machine....
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html