This is the mail archive of the gcc-help@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]

typedef conflict in GCC and JAVA


Hi,

I have GCC 4.1.1. I am trying to compile one C++ code using g++.

I am wondering what's the use of the following file?

usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/jni_md.h

As you can see this is in the gcc related include directory. But I am
getting compilation errors due to this file. The thing is one of the
datatypes defined in this header file is creating conflict with other
datatype with the same name in another Java related headerfile (file
and path shown below):-

/opt/jdk1.5/include/jni.h

The actual conflict is:-

The file jni.h has the following declaration:- 

typedef unsigned char   jboolean;

Whereas in the file jni_md.h there is following declaration(s):-

typedef int    jboolean __attribute__((__mode__(__QI__)));
typedef int8_t jboolean;


The compilation error I get is this:-

error: ?jboolean? has a previous declaration as ?typedef signed char
jboolean?


Can someone pls explain?

Thanks,
-Dhiraj


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