error CS0246: The type or namespace name `vtkObject' could not befound. Are you missing a using dire

  • Thread starter Thread starter mathieu
  • Start date Start date
M

mathieu

Hi all,

I do not understand the following error message when compiling my
custom module:

/usr/bin/mono-csc /out:/home/mathieu/Perso/gdcm-mummy/bin/./
Kitware.VTK.GDCM.dll /doc:/home/mathieu/Perso/gdcm-mummy/bin/./
Kitware.VTK.GDCM.xml /target:library /linkresource:/home/mathieu/Perso/
gdcm-mummy/bin/./libKitware.VTK.vtkgdcm.Unmanaged.so /reference:/usr/
lib/cli/ActiViz.NET/Kitware.VTK.dll @/home/mathieu/Perso/gdcm-mummy/
Utilities/VTK/Kitware.VTK.GDCM.CscArgs.txt
/home/mathieu/Perso/gdcm-mummy/Utilities/VTK/csharp/
vtkGDCMTesting.cs(23,31): error CS0246: The type or namespace name
`vtkObject' could not be found. Are you missing a using directive or
an assembly reference?

However the vtkObject is in the reference file:

$ monodis /usr/lib/cli/ActiViz.NET/Kitware.VTK.dll |grep "class public
auto ansi vtkObject"
.class public auto ansi vtkObject

What could be missing from my command line compilation options ?

Thanks much !
 
Hi all,

  I do not understand the following error message when compiling my
custom module:

/usr/bin/mono-csc /out:/home/mathieu/Perso/gdcm-mummy/bin/./
Kitware.VTK.GDCM.dll /doc:/home/mathieu/Perso/gdcm-mummy/bin/./
Kitware.VTK.GDCM.xml /target:library /linkresource:/home/mathieu/Perso/
gdcm-mummy/bin/./libKitware.VTK.vtkgdcm.Unmanaged.so /reference:/usr/
lib/cli/ActiViz.NET/Kitware.VTK.dll @/home/mathieu/Perso/gdcm-mummy/
Utilities/VTK/Kitware.VTK.GDCM.CscArgs.txt
/home/mathieu/Perso/gdcm-mummy/Utilities/VTK/csharp/
vtkGDCMTesting.cs(23,31): error CS0246: The type or namespace name
`vtkObject' could not be found. Are you missing a using directive or
an assembly reference?

  However the vtkObject is in the reference file:

$ monodis /usr/lib/cli/ActiViz.NET/Kitware.VTK.dll |grep "class public
auto ansi vtkObject"
  .class public auto ansi vtkObject

What could be missing from my command line compilation options ?

Thanks much !

Seems to me that class vtkObject found in assembly Kitware.VTK.dll
could be using a reference not found in your application, check that
assembly references.

Try setting a breakpoint using MonoDevelop, if it crashes on line 22
then it is caused because it cannot find Kitware.VTK.dll. If it
crashes on line 23 is because it cannot find DLL's references.

22: vtkObject o = new vtkObject();
23: o.Method();
 
Seems to me that class vtkObject found in assembly Kitware.VTK.dll
could be using a reference not found in your application, check that
assembly references.

Try setting a breakpoint using MonoDevelop, if it crashes on line 22
then it is caused because it cannot find Kitware.VTK.dll. If it
crashes on line 23 is because it cannot find DLL's references.

22: vtkObject o = new vtkObject();
23: o.Method();

That was it ! vtkObject had a parent class located in another
reference file.

Thanks for the speedy help !
 
Back
Top