This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

libgcj/7660: g++ from Java screws up my JNI code


>Number:         7660
>Category:       libgcj
>Synopsis:       g++ from Java screws up my JNI code
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 20 09:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Michael Newcomb
>Release:        3.0.3
>Organization:
Northrop Grumman IT
>Environment:
System: Linux localhost.localdomain 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure 
>Description:
I have a JNI program that works fine when I build it from make.  However, when I build it using Ant, g++ starts treating my JNI natives (jobject, jstring, jthrowable) as stuff from javaprims.h (java::lang::Object, java::lang::String, java::lang::Throwable).
It seems as though it thinks that since its being invoked from a Java process, it has the right to use the GCJ stuff.  I know this because I can copy/paste the output from ant into an xterm and it compiles fine.
>How-To-Repeat:
Get some JNI code and try to compile it with g++ from Ant.
>Fix:
Don't try to invoke g++ from within a Java process...  WTF is up with that?
>Release-Note:
>Audit-Trail:
>Unformatted:


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