[vtkusers] MFC app in VS .NET 2003

rex073 rex073 at 163.com
Fri Dec 23 03:48:13 EST 2005


Why not use  VTK-4.4-LatestRelease.exe instead of build vtk libs and dlls by yourself?
I think there should be some conflicts between STL and vtkIO.
One simple way is to add std:: before every keyword such as "cout". 

But I don't know how to set the flag of "VTK_USE_ANSI_STDLIB" in VCStudio.
Would you please show me? Thanks.
	



>Hi,
>
>I think you should build your app with the 
>VTK_USE_ANSI_STDLIB compiler flag.
>
>greets
>  Ingo
>
>
>---
>Dr.-Ing. Ingo H. de Boer
>
>Polytec GmbH
>Polytec-Platz 1-7, 76337 Waldbronn, Germany
>phone: ++49 7243 604 106
>fax  : ++49 7243 604 255
> 
>
>> -----Original Message-----
>> 
>> Hi all,
>> 
>> I am brand new to using vtk, I would like to add vtk 
>> capabilities to an
>> existing MFC app created in VS .NET 2003.  I am starting by 
>> trying to build
>> the simplest of MFC apps, but without success.  I perused the 
>> mailing list
>> archive but couldn't find an answer for my problems.  What I 
>> have done so
>> far:
>> 
>> Downloaded VTK-4.4-LatestRelease.zip, unzipped to C:\VTK
>> Used CMake 2.2 to create the .Net 2003 solution (including 
>> building the
>> dll's)
>> Open the solution, built ALL_BUILD, no errors (about 15 minutes on my
>> machine)
>> Moved the created dll's into Windows/System32
>> 
>> In VS .NET:
>> 
>> Added all the directories for the includes in the
>> Tools/Options/Projects/VC++ Directories (C:\vtk, 
>> C:\vtk\common, etc. etc.)
>> Did the same for the lib files (C:\vtk\bin\debug)  
>> (Should I have built as the release version instead of Debug?)
>> 
>> Then built a simple SDI MFC app called testvtk, put a button on the
>> interface, and tried to add the code from the cone.cxx file in the
>> testvtkView.cpp to get the cone to display with a button 
>> push.  The header
>> files are all found just fine, but I get many (>100) errors in files
>> provided in MSVC .NET ?!?!  These seem to be related to IO 
>> and utilities,
>> some examples of where the errors occur:
>> 
>> c:\Program Files\Microsoft Visual Studio .NET
>> 2003\Vc7\include\xutility(862): error C2143: syntax error : 
>> missing ';'
>> before '<'
>> c:\Program Files\Microsoft Visual Studio .NET
>> 2003\Vc7\include\streambuf(320): error C2146: syntax error : 
>> missing ';'
>> before identifier 'xsputn'
>> c:\Program Files\Microsoft Visual Studio .NET
>> 2003\Vc7\include\xstring(1564): error C2947: expecting '>' to 
>> terminate
>> template-argument-list, found '>'
>> 
>> etc. etc. ad infinitum (ok more than 100 at which point it 
>> terminates). 
>> These are related to the #includes from the cone.cxx file, 
>> the errors appear
>> when the includes are put into the testvtkView.cpp file.
>> 
>> Is there a setting I need to change that will prevent this?  
>> None of the
>> errors seem to be in any vtk files, but in MS files that they are
>> referencing.  Any help would be greatly appreciated . .
>> 
>> 
>> Kent
>> 
>> 
>> Kent Ogden PhD
>> Assistant Professor, Radiology
>> SUNY Upstate Medical University
>> 750 E. Adams Street
>> Syracuse, NY  13210
>> 
>> email:  ogdenk at upstate.edu 
>> voice:  (315) 464-5083
>> fax:       (315) 464-5095
>> _______________________________________________
>> 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
>_______________________________________________
>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

= = = = = = = = = = = = = = = = = = = =
			

        致
礼!
 
				 
        rex073
        rex073 at 163.com
          2005-12-23



More information about the vtkusers mailing list