This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


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

Re: Linking C code with GCJ


>>>>> "Daniel" == Daniel P Zepeda <dpz@pobox.com> writes:

Daniel> What are other people doing?

We do as Kresten says: compile C code with the C compiler, declare C
functions with `extern "C"' when compiling C++ code, and call the C
functions from CNI methods.  There are examples of this in libjava
itself; e.g. see java/lang/natMath.cc (for the C++ side) and
java/lang/fdlibm.h (for some of the C side).

Tom


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