<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/">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>---------------------------------------------------------------------------------------------------<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">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>