<br>Hi Boris, <br><br>Thanks for sharing your findings.<br><br>More that &quot;time.h&quot; we probably should track<br>includes for &quot;ctime&quot;, since that is the file<br>where the error message is reported:<br><br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:66: error:<br>
&#39;::clock_t&#39; has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:68: error: &#39;::tm&#39;<br>
has not been declared<br><br><div class="gmail_quote"><br>The &quot;ctime&quot; header is included in ITK from <br>the following files:<br><br>Utilities/vxl/vcl/vcl_ctime.h:# include &lt;ctime&gt;<br>Utilities/vxl/vcl/iso/vcl_ctime.h:#include &lt;ctime&gt;<br>
<br><br>I&#39;m not familiar with the iPhoneOS development environment....  <br>so I&#39;m just wondering if it doesn&#39;t get to be recognized by one<br>of the manual configurations that VXL has predefined.<br><br>If  you open the file<br>
<br>             Insight/Utilities/vxl/vcl/vcl_ctime.h<br><br>You will see the following code:<br><br>#ifndef vcl_ctime_h_<br>#define vcl_ctime_h_<br>/*<br>  fsm<br>*/<br><br>#include &quot;vcl_compiler.h&quot;<br><br>// Purpose: provide access to the &lt;time.h&gt; standard C header.<br>
<br>#if !VCL_CXX_HAS_HEADER_CTIME || defined(VCL_METRO_WERKS)<br># include &lt;time.h&gt;<br># define vcl_generic_ctime_STD /* */<br># include &quot;generic/vcl_ctime.h&quot;<br>#elif defined(VCL_VC60)<br># include &lt;ctime&gt;<br>
# define vcl_generic_ctime_STD /* */<br># include &quot;generic/vcl_ctime.h&quot;<br>#else<br># include &quot;iso/vcl_ctime.h&quot;<br>#endif<br><br>// ??<br>#ifndef VCL_WIN32<br>#include &lt;sys/times.h&gt;<br>#endif<br>
<br>#endif // vcl_ctime_h_<br><br><br>Do you recognize in this code something that would be<br>defined differently between MacOS and the iPhoneOS ?<br><br>You may also find interesting content in the file:<br><br>/home/ibanez/src/Insight/Utilities/vxl/vcl/vcl_compiler.h<br>
<br><br>    Please let us know,<br><br><br>           Thanks<br><br><br>                  Luis<br><br><br>-----------------------------------------------------------------------<br>On Sat, Apr 10, 2010 at 9:33 AM, Luis Ibanez <span dir="ltr">&lt;<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>Hi Boris,<br><br>It would seem that &quot;clock_t&quot; is not defined in the <br>expected location in your platform.<br>
<br>Please try the following example first <br>(independently of ITK):<br><br><br>(taken from):<br>
<a href="http://www.cplusplus.com/reference/clibrary/ctime/clock/" target="_blank">http://www.cplusplus.com/reference/clibrary/ctime/clock/</a><br><br><pre><code><cite>/* clock example: countdown */</cite><br><dfn>#include &lt;stdio.h&gt;</dfn><br>

<dfn>#include &lt;time.h&gt;</dfn><br><br><var>void</var> wait ( <var>int</var> seconds )<br>{<br>  clock_t endwait;<br>  endwait = clock () + seconds * CLOCKS_PER_SEC ;<br>  <var>while</var> (clock() &lt; endwait) {}<br>

}<br><br><var>int</var> main ()<br>{<br>  <var>int</var> n;<br>  printf (<kbd>&quot;Starting countdown...\n&quot;</kbd>);<br>  <var>for</var> (n=10; n&gt;0; n--)<br>  {<br>    printf (<kbd>&quot;%d\n&quot;</kbd>,n);<br>    wait (1);<br>

  }<br>  printf (<kbd>&quot;FIRE!!!\n&quot;</kbd>);<br>  <var>return</var> 0;<br>}</code></pre><br><br>And let us know if it can be compiled in your platform.<br><br><br>     Thanks<br><br><br>          Luis<br><br><br>---------------------------------------------------------------------------------------------------<div>
<div></div><div class="h5"><br>
<div class="gmail_quote">On Fri, Apr 9, 2010 at 10:24 PM, Boris Shabash <span dir="ltr">&lt;<a href="mailto:bshabash@hotmail.com" target="_blank">bshabash@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
Hello everyone<br>
<br>
I am currently trying to compile ITK on the iphoneOS and for that I need to<br>
be working in the Xcode environment.<br>
<br>
I&#39;ve downloaded ITK and Cmake and created an Xcode project for ITK using<br>
Cmake.<br>
Now for the purpose of testing I&#39;ve created a new C++ command line utility<br>
tool and included all the paths to find the libraries and headers.<br>
<br>
However, when I try to compile the command line utility tool I get the<br>
following error from including the ITK paths:<br>
<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:66: error:<br>
&#39;::clock_t&#39; has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:68: error: &#39;::tm&#39;<br>
has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:70: error:<br>
&#39;::clock&#39; has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:71: error:<br>
&#39;::difftime&#39; has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:72: error:<br>
&#39;::mktime&#39; has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:73: error:<br>
&#39;::time&#39; has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:74: error:<br>
&#39;::asctime&#39; has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:75: error:<br>
&#39;::ctime&#39; has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:76: error:<br>
&#39;::gmtime&#39; has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:77: error:<br>
&#39;::localtime&#39; has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:78: error:<br>
&#39;::strftime&#39; has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:<br>
In member function &#39;_InIter std::time_get&lt;_CharT,<br>
_InIter&gt;::_M_extract_via_format(_InIter, _InIter, std::ios_base&amp;,<br>
std::_Ios_Iostate&amp;, tm*, const _CharT*) const&#39;:<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1794:<br>
error: invalid use of undefined type &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1801:<br>
error: invalid use of undefined type &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1809:<br>
error: invalid use of undefined type &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1816:<br>
error: invalid use of undefined type &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1828:<br>
error: invalid use of undefined type &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1835:<br>
error: invalid use of undefined type &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1838:<br>
error: invalid use of undefined type &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1850:<br>
error: invalid use of undefined type &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1855:<br>
error: invalid use of undefined type &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1863:<br>
error: invalid use of undefined type &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1867:<br>
error: invalid use of undefined type &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1887:<br>
error: invalid use of undefined type &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1923:<br>
error: invalid use of undefined type &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1931:<br>
error: invalid use of undefined type &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:<br>
In member function &#39;virtual _InIter std::time_get&lt;_CharT,<br>
_InIter&gt;::do_get_weekday(_InIter, _InIter, std::ios_base&amp;,<br>
std::_Ios_Iostate&amp;, tm*) const&#39;:<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:2157:<br>
error: invalid use of undefined type &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:<br>
In member function &#39;virtual _InIter std::time_get&lt;_CharT,<br>
_InIter&gt;::do_get_monthname(_InIter, _InIter, std::ios_base&amp;,<br>
std::_Ios_Iostate&amp;, tm*) const&#39;:<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:2203:<br>
error: invalid use of undefined type &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:<br>
In member function &#39;virtual _InIter std::time_get&lt;_CharT,<br>
_InIter&gt;::do_get_year(_InIter, _InIter, std::ios_base&amp;, std::_Ios_Iostate&amp;,<br>
tm*) const&#39;:<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:2230:<br>
error: invalid use of undefined type &#39;struct tm&#39;<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of &#39;struct tm&#39;<br>
<br>
What is going on?<br>
--<br>
View this message in context: <a href="http://old.nabble.com/ITK-with-Xcode-tp28199033p28199033.html" target="_blank">http://old.nabble.com/ITK-with-Xcode-tp28199033p28199033.html</a><br>
Sent from the ITK - Users mailing list archive at Nabble.com.<br>
<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote></div><br>
</div></div></blockquote></div><br>