| JNIEXPORT  syntax error [message #222839] | 
Mon, 01 September 2008 11:15   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: mhesselbach.gmx.net 
 
I have a pair of Eclipse projects: A java app calling some native C++ code. 
On windows, I used Eclipse for the java project, and VS for the C++ dll. 
 
Now I build the same for linux, using the latest Eclipse version  
(eclipse-cpp-ganymede-linux-gtk.tar.gz) for the C++ part. 
The first steps are working : 
  I added the include path to <jni.h> and to the linux\jni-md.h file as  
well. 
  Then, I got the shared lib built, and I can load it and access its methods  
from my java project. 
 
However, the implementing methods are marked in yellow as "syntax error"  
without further hint, in my CDT project. 
If I add the javah include file explicitly to the Eclipse project and open  
it, the declarations there show the same error indicator, underlining 
"JNIEXPORT jlong JNICALL" as a warning. 
 
BTW methods returning "void" have the method name underlined as well: 
 
make runs well, the Problems window is empty,  it's just the Eclipse syntax  
highlighter. 
Is that something everybody else simply accepts? 
 
Thanks for some feedback  ( A similar message one ore two years ago seems  
not to get any answer ...)
 |  
 |  
  | 
| Re: JNIEXPORT  syntax error [message #222847 is a reply to message #222839] | 
Mon, 01 September 2008 13:05    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: 4cs6fcg02.sneakemail.com 
 
Michael Hesselbach schreef: 
> I have a pair of Eclipse projects: A java app calling some native C++ code. 
> On windows, I used Eclipse for the java project, and VS for the C++ dll. 
>  
> Now I build the same for linux, using the latest Eclipse version  
> (eclipse-cpp-ganymede-linux-gtk.tar.gz) for the C++ part. 
> The first steps are working : 
>   I added the include path to <jni.h> and to the linux\jni-md.h file as  
> well. 
>   Then, I got the shared lib built, and I can load it and access its methods  
> from my java project. 
>  
> However, the implementing methods are marked in yellow as "syntax error"  
> without further hint, in my CDT project. 
> If I add the javah include file explicitly to the Eclipse project and open  
> it, the declarations there show the same error indicator, underlining 
> "JNIEXPORT jlong JNICALL" as a warning. 
>  
> BTW methods returning "void" have the method name underlined as well: 
>  
> make runs well, the Problems window is empty,  it's just the Eclipse syntax  
> highlighter. 
> Is that something everybody else simply accepts? 
 
Try to rebuild the index: right-click on the file, Index → choose 
appropriate. 
 
H. 
--  
Hendrik Maryns 
http://tcl.sfs.uni-tuebingen.de/~hendrik/ 
================== 
Ask smart questions, get good answers: 
http://www.catb.org/~esr/faqs/smart-questions.html
 |  
 |  
  | 
| Re: JNIEXPORT  syntax error [message #222863 is a reply to message #222847] | 
Tue, 02 September 2008 03:57   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: dontreplyhere.inter.net 
 
"Hendrik Maryns" wrote 
> Try to rebuild the index: right-click on the file, Index ? choose 
> appropriate. 
> [...] 
> ================== 
> Ask smart questions, get good answers: 
> http://www.catb.org/~esr/faqs/smart-questions.html 
 
Yes: Right-clicking the project folder in Project Explorer shows 
this "Index" submenu item, and "Update" helped. 
 
(Seemed to be a smart question ;) 
Thanks a lot 
 
-- Michael 
..
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.04049 seconds