Hello All!<br><br>I try to compile this helloworld program with VTK header<br><br>#include &lt;iostream&gt;<br>#include &quot;vtkStructuredGridWriter.h&quot;<br><br>using namespace std;<br><br>int main(){<br>    cout &lt;&lt; &quot;Hello VTK!!!&quot; &lt;&lt; endl;<br>
    return 0;<br>}<br><br><br>I compile this program on Ubuntu Linux 9.04 using g++:<br>g++ /src/main.cpp -I/home/andrew/archives/vtk-5.4.2 -I/home/andrew/archives/vtk-5.4.2/IO -I/home/andrew/archives/vtk-5.4.2/Filtering -I/home/andrew/archives/vtk-5.4.2/Common -I/home/andrew/archives/vtk-5.4.2/vtkstd -I/home/andrew/archives/vtk-5.4.2/Utilities -I/home/andrew/archives/vtk-5.4.2/Views -o fdtd.exe<br>
<br>but get these errors:<br><br> In file included from /usr/include/c++/4.3/backward/strstream:51,<br>                   from /home/andrew/archives/vtk-5.4.2/Common/vtkIOStream.h:112,<br>                   from /home/andrew/archives/vtk-5.4.2/Common/vtkSystemIncludes.h:40,<br>
                   from /home/andrew/archives/vtk-5.4.2/Common/vtkIndent.h:24,<br>                   from /home/andrew/archives/vtk-5.4.2/Common/vtkObjectBase.h:43,<br>                   from /home/andrew/archives/vtk-5.4.2/Common/vtkObject.h:41,<br>
                   from /home/andrew/archives/vtk-5.4.2/Filtering/vtkAlgorithm.h:32,<br>                   from /home/andrew/archives/vtk-5.4.2/IO/vtkWriter.h:31,<br>                   from /home/andrew/archives/vtk-5.4.2/IO/vtkDataWriter.h:29,<br>
                   from /home/andrew/archives/vtk-5.4.2/IO/vtkStructuredGridWriter.h:26,<br>                   from /home/andrew/workspace/FDTD/src/main.cpp:2:<br>  /usr/include/c++/4.3/backward/backward_warning.h:33:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.<br>
  In file included from /usr/include/c++/4.3/ios:48,<br>                   from /usr/include/c++/4.3/ostream:45,<br>                   from /usr/include/c++/4.3/iostream:45,<br>                   from /home/andrew/archives/vtk-5.4.2/Common/vtkIOStream.h:35,<br>
                   from /home/andrew/archives/vtk-5.4.2/Common/vtkSystemIncludes.h:40,<br>                   from /home/andrew/archives/vtk-5.4.2/Common/vtkIndent.h:24,<br>                   from /home/andrew/archives/vtk-5.4.2/Common/vtkObjectBase.h:43,<br>
                   from /home/andrew/archives/vtk-5.4.2/Common/vtkObject.h:41,<br>                   from /home/andrew/archives/vtk-5.4.2/Filtering/vtkAlgorithm.h:32,<br>                   from /home/andrew/archives/vtk-5.4.2/IO/vtkWriter.h:31,<br>
                   from /home/andrew/archives/vtk-5.4.2/IO/vtkDataWriter.h:29,<br>                   from /home/andrew/archives/vtk-5.4.2/IO/vtkStructuredGridWriter.h:26,<br>                   from /home/andrew/workspace/FDTD/src/main.cpp:2:<br>
  /usr/include/c++/4.3/bits/ios_base.h:210: error: expected class-name before ‘{’ token<br>  /usr/include/c++/4.3/bits/ios_base.h:226: error: field ‘_M_msg’ has incomplete type<br>  In file included from /usr/include/c++/4.3/bits/basic_ios.h:44,<br>
                   from /usr/include/c++/4.3/ios:50,<br>                   from /usr/include/c++/4.3/ostream:45,<br>                   from /usr/include/c++/4.3/iostream:45,<br>                   from /home/andrew/archives/vtk-5.4.2/Common/vtkIOStream.h:35,<br>
                   from /home/andrew/archives/vtk-5.4.2/Common/vtkSystemIncludes.h:40,<br>                   from /home/andrew/archives/vtk-5.4.2/Common/vtkIndent.h:24,<br>                   from /home/andrew/archives/vtk-5.4.2/Common/vtkObjectBase.h:43,<br>
                   from /home/andrew/archives/vtk-5.4.2/Common/vtkObject.h:41,<br>                   from /home/andrew/archives/vtk-5.4.2/Filtering/vtkAlgorithm.h:32,<br>                   from /home/andrew/archives/vtk-5.4.2/IO/vtkWriter.h:31,<br>
                   from /home/andrew/archives/vtk-5.4.2/IO/vtkDataWriter.h:29,<br>                   from /home/andrew/archives/vtk-5.4.2/IO/vtkStructuredGridWriter.h:26,<br>                   from /home/andrew/workspace/FDTD/src/main.cpp:2:<br>
  /usr/include/c++/4.3/bits/locale_facets.h: In member function ‘std::string std::numpunct&lt;_CharT&gt;::grouping() const’:<br>  /usr/include/c++/4.3/bits/locale_facets.h:1795: error: return type ‘struct std::string’ is incomplete<br>
  /usr/include/c++/4.3/bits/locale_facets.h: In member function ‘virtual std::string std::numpunct&lt;_CharT&gt;::do_grouping() const’:<br>  /usr/include/c++/4.3/bits/locale_facets.h:1863: error: return type ‘struct std::string’ is incomplete<br>
  In file included from /usr/include/c++/4.3/bits/locale_facets.h:2635,<br>                   from /usr/include/c++/4.3/bits/basic_ios.h:44,<br>                   from /usr/include/c++/4.3/ios:50,<br>                   from /usr/include/c++/4.3/ostream:45,<br>
                   from /usr/include/c++/4.3/iostream:45,<br>                   from /home/andrew/archives/vtk-5.4.2/Common/vtkIOStream.h:35,<br>                   from /home/andrew/archives/vtk-5.4.2/Common/vtkSystemIncludes.h:40,<br>
                   from /home/andrew/archives/vtk-5.4.2/Common/vtkIndent.h:24,<br>                   from /home/andrew/archives/vtk-5.4.2/Common/vtkObjectBase.h:43,<br>                   from /home/andrew/archives/vtk-5.4.2/Common/vtkObject.h:41,<br>
                   from /home/andrew/archives/vtk-5.4.2/Filtering/vtkAlgorithm.h:32,<br>                   from /home/andrew/archives/vtk-5.4.2/IO/vtkWriter.h:31,<br>                   from /home/andrew/archives/vtk-5.4.2/IO/vtkDataWriter.h:29,<br>
                   from /home/andrew/archives/vtk-5.4.2/IO/vtkStructuredGridWriter.h:26,<br>                   from /home/andrew/workspace/FDTD/src/main.cpp:2:<br>  /usr/include/c++/4.3/bits/locale_facets.tcc: In member function ‘_InIter std::num_get&lt;_CharT, _InIter&gt;::_M_extract_float(_InIter, _InIter, std::ios_base&amp;, std::_Ios_Iostate&amp;, std::string&amp;) const’:<br>
  /usr/include/c++/4.3/bits/locale_facets.tcc:195: error: invalid use of incomplete type ‘struct std::string’<br>  /usr/include/c++/4.3/bits/stringfwd.h:56: error: declaration of ‘struct std::string’<br>  /usr/include/c++/4.3/bits/locale_facets.tcc:266: error: invalid use of incomplete type ‘struct std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;’<br>
  /usr/include/c++/4.3/bits/stringfwd.h:56: error: declaration of ‘struct std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;’<br>  /usr/include/c++/4.3/bits/locale_facets.tcc:280: error: invalid use of incomplete type ‘struct std::string’<br>
  /usr/include/c++/4.3/bits/stringfwd.h:56: error: declaration of ‘struct std::string’<br>  /usr/include/c++/4.3/bits/locale_facets.tcc:303: error: invalid use of incomplete type ‘struct std::string’<br>  /usr/include/c++/4.3/bits/stringfwd.h:56: error: declaration of ‘struct std::string’<br>
  /usr/include/c++/4.3/bits/locale_facets.tcc:339: error: invalid use of incomplete type ‘struct std::string’<br>  /usr/include/c++/4.3/bits/stringfwd.h:56: error: declaration of ‘struct std::string’<br>  /usr/include/c++/4.3/bits/locale_facets.tcc: In member function ‘_InIter std::num_get&lt;_CharT, _InIter&gt;::_M_extract_int(_InIter, _InIter, std::ios_base&amp;, std::_Ios_Iostate&amp;, _ValueT&amp;) const’:<br>
  /usr/include/c++/4.3/bits/locale_facets.tcc:455: error: invalid use of incomplete type ‘struct std::string’<br>  /usr/include/c++/4.3/bits/stringfwd.h:56: error: declaration of ‘struct std::string’<br>  /usr/include/c++/4.3/bits/locale_facets.tcc:539: error: invalid use of incomplete type ‘struct std::string’<br>
  /usr/include/c++/4.3/bits/stringfwd.h:56: error: declaration of ‘struct std::string’<br>  /usr/include/c++/4.3/bits/locale_facets.tcc:551: error: invalid use of incomplete type ‘struct std::string’<br>  /usr/include/c++/4.3/bits/stringfwd.h:56: error: declaration of ‘struct std::string’<br>
  /usr/include/c++/4.3/bits/locale_facets.tcc: In member function ‘virtual _InIter std::num_get&lt;_CharT, _InIter&gt;::do_get(_InIter, _InIter, std::ios_base&amp;, std::_Ios_Iostate&amp;, float&amp;) const’:<br>  /usr/include/c++/4.3/bits/locale_facets.tcc:683: error: invalid use of incomplete type ‘struct std::string’<br>
  /usr/include/c++/4.3/bits/stringfwd.h:56: error: declaration of ‘struct std::string’<br>  /usr/include/c++/4.3/bits/locale_facets.tcc:685: error: invalid use of incomplete type ‘struct std::string’<br>  /usr/include/c++/4.3/bits/stringfwd.h:56: error: declaration of ‘struct std::string’<br>
  /usr/include/c++/4.3/bits/locale_facets.tcc: In member function ‘virtual _InIter std::num_get&lt;_CharT, _InIter&gt;::do_get(_InIter, _InIter, std::ios_base&amp;, std::_Ios_Iostate&amp;, double&amp;) const’:<br>  /usr/include/c++/4.3/bits/locale_facets.tcc:696: error: invalid use of incomplete type ‘struct std::string’<br>
  /usr/include/c++/4.3/bits/stringfwd.h:56: error: declaration of ‘struct std::string’<br>  /usr/include/c++/4.3/bits/locale_facets.tcc:698: error: invalid use of incomplete type ‘struct std::string’<br>  /usr/include/c++/4.3/bits/stringfwd.h:56: error: declaration of ‘struct std::string’<br>
  /usr/include/c++/4.3/bits/locale_facets.tcc: In member function ‘virtual _InIter std::num_get&lt;_CharT, _InIter&gt;::do_get(_InIter, _InIter, std::ios_base&amp;, std::_Ios_Iostate&amp;, long double&amp;) const’:<br>  /usr/include/c++/4.3/bits/locale_facets.tcc:724: error: invalid use of incomplete type ‘struct std::string’<br>
  /usr/include/c++/4.3/bits/stringfwd.h:56: error: declaration of ‘struct std::string’<br>  /usr/include/c++/4.3/bits/locale_facets.tcc:726: error: invalid use of incomplete type ‘struct std::string’<br>  /usr/include/c++/4.3/bits/stringfwd.h:56: error: declaration of ‘struct std::string’<br>
  In file included from /usr/include/c++/4.3/iostream:45,<br>                   from /home/andrew/archives/vtk-5.4.2/Common/vtkIOStream.h:35,<br>                   from /home/andrew/archives/vtk-5.4.2/Common/vtkSystemIncludes.h:40,<br>
                   from /home/andrew/archives/vtk-5.4.2/Common/vtkIndent.h:24,<br>                   from /home/andrew/archives/vtk-5.4.2/Common/vtkObjectBase.h:43,<br>                   from /home/andrew/archives/vtk-5.4.2/Common/vtkObject.h:41,<br>
                   from /home/andrew/archives/vtk-5.4.2/Filtering/vtkAlgorithm.h:32,<br>                   from /home/andrew/archives/vtk-5.4.2/IO/vtkWriter.h:31,<br>                   from /home/andrew/archives/vtk-5.4.2/IO/vtkDataWriter.h:29,<br>
                   from /home/andrew/archives/vtk-5.4.2/IO/vtkStructuredGridWriter.h:26,<br>                   from /home/andrew/workspace/FDTD/src/main.cpp:2:<br>  /usr/include/c++/4.3/ostream: In destructor ‘std::basic_ostream&lt;_CharT, _Traits&gt;::sentry::~sentry()’:<br>
  /usr/include/c++/4.3/ostream:412: error: there are no arguments to ‘uncaught_exception’ that depend on a template parameter, so a declaration of ‘uncaught_exception’ must be available<br>  /usr/include/c++/4.3/ostream:412: error: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)<br>
<br>BUILD FAILED<br><br><br>Is there any ideas, what&#39;s wrong?<br><br>Thanks!<br>