This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin 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]

Re: JNI multiple String problem


Nicholas Burton wrote:

I am having a problem with java native interface under Cygwin that I don't have under solaris.

The version of GCC that comes with the latest Cygwin setup.exe contains GCJ and libgcj, which contains its own Java compiler, JNI headers, and runtime libraries.


Try get around the GCJ stuff by using explicit -I, -L and -l command line options combined with the -mno-cygwin option:

$ gcc -mno-cygwin -c -I c:/j2sdk1.4.1_01/include -I \
c:/j2sdk1.4.1_01/include/win32 nativ.c

$ gcc -mno-cygwin -shared -L c:/j2sdk1.4.1_01/jre/bin -o cygnativ.dll native.o -lwhatever

--
Weiqi Gao
weiqigao at networkusa dot net



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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