[1199] in java-interest

home help back first fref pref prev next nref lref last post

Re: example of calling native c++

daemon@ATHENA.MIT.EDU (Duncan Swain)
Fri Aug 25 18:31:11 1995

Date: Fri, 25 Aug 1995 14:41:58 -0400
From: dswain@condor.citi.doc.ca (Duncan Swain)
To: java-interest@java.sun.com
Cc: duncan@condor.citi.doc.ca


>extern "C" {
>void demo_Hello_printhello(struct Hdemo_Hello *blah);
>#include "javaString.h"
>#include "demo_Hello.h"
>}

My problems arise when I try to get Inventor headers into the extern "C" statement:

"/opt/OpenInventor/include/Inventor/SbString.h", line 128: Error: Only one of a set of overloaded functions can be "C" or "Pascal".

If I leave the inventor headers outside the extern "C" statement, I get errors when my native library is loaded at runtime:

[dswain on corb] /usr/ncis/project/native> ld.so.1: /usr/ncis/hotjava/bin/sun4/java: fatal: relocation error: symbol not found: __0fESoDBEinitvT: referenced in /usr/ncis/project/lib/libnative.so (/usr/ncis/project/lib/libnative.so)

Do the Inventor headers have to be inside the extern "C" statement?
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post