<DIV>Thank you for your suggestion, Amy, </DIV>
<DIV> 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?</DIV>
<DIV> thank you again!</DIV>
<DIV> Mark </DIV>
<DIV> </DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 12px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px; FONT-FAMILY: Arial Narrow">------------------------------------</DIV>
<DIV style="FONT-WEIGHT: normal">Hi Mark,<BR><BR>Make sure that your VTK *build* tree is in your include path; this is in <BR>order for your compiler to find vtkstd/string, which is configured in <BR>your VTK build tree. You will also need to have VTK/Common in your <BR>include path in order for the compiler to find vtkStdString.h.<BR><BR>- Amy<BR><BR>Mark Jefferson wrote:<BR>> Hi, David,<BR>> I have used vtkStdString just like you suggest. and I want to add some <BR>> notation in the render window. I don't think the usage of vtkStdString <BR>> is wrong. here is part of my codes :<BR>> #include <vtkStdString.h><BR>> #include <vtkScaledTextActor.h><BR>> void main()<BR>> {<BR>> vtkStdString str("Images");<BR>> vtkScaledTextActor * text = vtkScaledTextActor::New();<BR>> text->SetInput(str);<BR>> ... ...<BR>> }<BR>> but I always get a error when I compile my codes :<BR>> *Cannot open include file: 'vtkstd/string': No such file or directory*<BR>> but vtkstd/string doesn't exist in vtk, and I also could not find it.<BR>> could you tell me how to modify it if I want to use class vtkStdString?<BR>> thank you!<BR>> MJ<BR>> ------------------ ÔʼÓʼþ ------------------<BR>> Are you using CMake to build your console application?<BR>><BR>> See any of the projects in the VTK/Examples folder for example <BR>> CMakeLists.txt files that show how to build a project that links to <BR>> VTK using CMake. From such a project, using vtkStdString should simply <BR>> be a matter of:<BR>><BR>> #include "vtkStdString.h"<BR>><BR>> void TestFunc()<BR>> {<BR>> vtkStdString s("hi there");<BR>> // do something useful with s here...<BR>> }<BR>><BR>> What is the error you get if you try to use vtkStdString?<BR>><BR>><BR>> On Sun, Apr 6, 2008 at 9:43 AM, Mark Jefferson <mark.jefferson@qq.com <BR>> <mailto:mark.jefferson@qq.com>> wrote:<BR>><BR>> Hi, David,<BR>> I have found vtkstd in CMakeLists.txt, but I don't know how to do<BR>> next? maybe, should I recompile VTK using CMake again? but I have<BR>> recompile vtk for many times, I still could not use class<BR>> vtkStdString.<BR>> MJ<BR>><BR>> ------------------------------------------------------------------------<BR>><BR>> _______________________________________________<BR>> This is the private VTK discussion list.<BR>> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<BR>> Follow this link to subscribe/unsubscribe:<BR>> http://www.vtk.org/mailman/listinfo/vtkusers<BR>> <BR><BR>-- <BR>Amy Squillacote Phone: (256) 726-4839<BR>Computer Scientist Fax: (256) 726-4806<BR>CFD Research Corporation Web: http://www.cfdrc.com<BR>215 Wynn Drive, Suite 501<BR>Huntsville, AL 35805<BR><BR></DIV>