Linking C code with GCJ
Daniel P. Zepeda
dpz@pobox.com
Mon Oct 18 20:36:00 GMT 1999
Hi,
Is there a way to link object code created with a C compiler in
with the rest of my C++/Java code that is called from the C++ side
using CNI?
The reason I ask is I have this set of C libraries that I want to
use with my Java program. They are written in straight C. I figured all I
need to do is change the compiler from gcc to g++ and compile them to use
with CNI and Java. I know the programs are correct because I can compile
and run them with gcc in C mode. The problem comes when I try to compile
them with the C++ compiler. I get a lot of:
assignment to `unsigned char *' from `char *' changes signedness
and the same error with passing args to/from functions. Now I know what
this means, but does it really matter? I don't care as long as it works on
this one platform. Must I go through changing all the assignments and
args passing to fix this up or is there an easier way?
I've tried the -funsigned-char and -fsigned-char g++ options with no
effect.
What are other people doing?
--
Daniel P. Zepeda
dpz@pobox.com
"In complete darkness, we are all the same. Only our knowledge and wisdom
separates us there." -- J. Jackson
More information about the Java
mailing list