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

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 !
 
B

bradbury9

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();
 
M

mathieu

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 !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top