[vtk-developers] dashboard failure with Java wrapping and Obj-C++?

David Gobbi david.gobbi at gmail.com
Wed Apr 11 15:10:31 EDT 2012


Hi Sean,

The old Rendering/CMakeLists.txt had the following lines, were they
responsible for eliminating the error during the pre-modularization
build?

# Fix for bug#1026 moved out of the common section.  This should be
# changed to add the flag only in the right places (CMAKE_CXX_FLAGS?).
IF(APPLE AND VTK_WRAP_JAVA)
  ADD_DEFINITIONS("-ObjC++")
ENDIF(APPLE AND VTK_WRAP_JAVA)

 - David

On Wed, Apr 11, 2012 at 12:50 PM, Sean McBride <sean at rogue-research.com> wrote:
> Hi all,
>
> My dashboard has a new error:
>
> <http://open.cdash.org/viewBuildError.php?buildid=2175108>
>
> In file included from /Users/builder/external/VTK-clang-rel-x86_64/Rendering/Core/vtkRenderWindowJava.cxx:1405:
> In file included from /Users/builder/external/VTK/Wrapping/JavaCore/vtkJavaAwt.h:16:
> In file included from /System/Library/Frameworks/JavaVM.framework/Headers/jawt_md.h:11:
> In file included from /System/Library/Frameworks/AppKit.framework/Headers/NSView.h:8:
> In file included from /System/Library/Frameworks/AppKit.framework/Headers/NSResponder.h:8:
> In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:5:
> /System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:319:1: error: expected unqualified-id
> @class NSString, Protocol;
> ^
>
> The problem seems to be that a C++ file (.cxx) is including an Obj-C header and the compiler barfs at the Obj-C @class declaration.  The usual solution is to use so-called Obj-C++ by renaming the source file to .mm.
>
> Anyone know what changed here?  (I guess modularization...)
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 sean at rogue-research.com
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada



More information about the vtk-developers mailing list