[vtkusers] Compiling VTK Java wrappers on MacOSX Panther

Eugene Kim eugene at salk.edu
Fri Jul 30 14:57:27 EDT 2004


Hey David,

	I ran into this problem before.  Perhaps we don't have the same
issue, but try this out.  When you hit that error, cmake will exit.  At
this point, go back into the cmake file and add the flag -ObjC++.  run
make again.  I saw a previous question like this, and the advice was to
simply add the -ObjC++ flag.  If you add it at begining of you
compilation, chances are it won't get anywhere.  The trick is to do it
when you crash at this error.

Hope that helps,
Eugene Kim

On Fri, 30 Jul 2004, David Clunie wrote:

> On Panther, I can the latest VTK CVS source to compile as long as
> I do not include the Java wrappers (I tried and failed with 4.2 and
> 4.4).
>
> Since the goal of my project is to use VTK from Java on the Mac,
> I have to, and if I do, I get ...
>
> Building object file vtkRenderWindowJava.o...
> In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:5,
>                   from /System/Library/Frameworks/AppKit.framework/Headers/NSResponder.h:8,
>                   from /System/Library/Frameworks/AppKit.framework/Headers/NSView.h:8,
>                   from /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jawt_md.h:11,
>                   from /Volumes/Inside Helgray - User/Users/dclunie/Work/VTK/VTK/Common/vtkJavaAwt.h:16,
>                   from /Volumes/Inside Helgray - User/Users/dclunie/Work/VTK/VTK/Rendering/vtkRenderWindowJava.cxx:1174:
> /System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:56: error: parse
>     error before `@' token
> /System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:58: error: syntax
>     error before `*' token
> ...
>
> This is on:
>
> System Version:	Mac OS X 10.3.4 (7H63)
> Kernel Version:	Darwin 7.4.0c++ (GCC) 3.3 20030304 (Apple Computer, Inc. build 1495)
> java version "1.4.2_04"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-135)
> Java HotSpot(TM) Client VM (build 1.4.2-36, mixed mode)
>
> (Admittedly the JDK is a developer preview, 1.4.2 DP3, rather
> than the production 1.4.2, but I do not think that has anything
> to do with the problem).
>
> Looking in NSObjCRuntime.h, line 56 is:
>
> @class NSString;
>
> Is the build failing because this is an Objective C statement rather
> than C or C++, and vtkRenderWindowJava.cxx is a C++ file, and g++
> uses the file name extension to choose the language ?
>
> Just a thought.
>
> Commenting out the '#include "vtkJavaAwt.h"' in vtkrenderWindowJava.cxx
> allowed the compile to get past this point, but since that line is
> added specifically by vtkWrapJava.c, and since vtkJavaAwt.h is not
> invoked elsewhere and hence the JNI methods that it defines never
> compiled, this will haunt me later I am sure.
>
> Any suggestions ?
>
> david
>
> PS. Also, VTK_USE_HYBRID had to be ON, else complained about
> missing BoxWidget and PlaneWidget in java wrapper tests.
>
>
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list