[vtkusers] 回复: Re : where is vtkstd/string?

Mark Jefferson mark.jefferson at qq.com
Mon Apr 7 09:52:16 EDT 2008


Thank you for your suggestion, Amy, 
   it is ok now, but I don't know why I should add this include path. because I have used vtkStdString successfully and I don't add this include path then. but now, when I recompile my codes, which had no error and used vtkStdString,  I always get error. I don't know why. maybe, vtk build tree must be added in the include path?
   thank you again!
   Mark  
  
 ------------------------------------
 Hi Mark,

Make sure that your VTK *build* tree is in your include path; this is in 
order for your compiler to find vtkstd/string, which is configured in 
your VTK build tree. You will also need to have VTK/Common in your 
include path in order for the compiler to find vtkStdString.h.

- Amy

Mark Jefferson wrote:
> Hi, David,
> I have used vtkStdString just like you suggest. and I want to add some 
> notation in the render window. I don't think the usage of vtkStdString 
> is wrong. here is part of my codes :
> #include <vtkStdString.h>
> #include <vtkScaledTextActor.h>
> void main()
> {
> vtkStdString str("Images");
> vtkScaledTextActor * text = vtkScaledTextActor::New();
> text->SetInput(str);
> ... ...
> }
> but I always get a error when I compile my codes :
> *Cannot open include file: 'vtkstd/string': No such file or directory*
> but vtkstd/string doesn't exist in vtk, and I also could not find it.
> could you tell me how to modify it if I want to use class vtkStdString?
> thank you!
> MJ
> ------------------ 原始邮件 ------------------
> Are you using CMake to build your console application?
>
> See any of the projects in the VTK/Examples folder for example 
> CMakeLists.txt files that show how to build a project that links to 
> VTK using CMake. From such a project, using vtkStdString should simply 
> be a matter of:
>
> #include "vtkStdString.h"
>
> void TestFunc()
> {
> vtkStdString s("hi there");
> // do something useful with s here...
> }
>
> What is the error you get if you try to use vtkStdString?
>
>
> On Sun, Apr 6, 2008 at 9:43 AM, Mark Jefferson <mark.jefferson at qq.com 
> <mailto:mark.jefferson at qq.com>> wrote:
>
>     Hi, David,
>     I have found vtkstd in CMakeLists.txt, but I don't know how to do
>     next? maybe, should I recompile VTK using CMake again? but I have
>     recompile vtk for many times, I still could not use class
>     vtkStdString.
>     MJ
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>   

-- 
Amy Squillacote                    Phone: (256) 726-4839
Computer Scientist                 Fax: (256) 726-4806
CFD Research Corporation           Web: http://www.cfdrc.com
215 Wynn Drive, Suite 501
Huntsville, AL  35805
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080407/a5943bf5/attachment.htm>


More information about the vtkusers mailing list