<br>Hi Boris,<br><br>It would seem that "clock_t" 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 <stdio.h></dfn><br>
<dfn>#include <time.h></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() < endwait) {}<br>
}<br><br><var>int</var> main ()<br>{<br> <var>int</var> n;<br> printf (<kbd>"Starting countdown...\n"</kbd>);<br> <var>for</var> (n=10; n>0; n--)<br> {<br> printf (<kbd>"%d\n"</kbd>,n);<br> wait (1);<br>
}<br> printf (<kbd>"FIRE!!!\n"</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"><<a href="mailto:bshabash@hotmail.com">bshabash@hotmail.com</a>></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've downloaded ITK and Cmake and created an Xcode project for ITK using<br>
Cmake.<br>
Now for the purpose of testing I'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>
'::clock_t' has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:68: error: '::tm'<br>
has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:70: error:<br>
'::clock' has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:71: error:<br>
'::difftime' has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:72: error:<br>
'::mktime' has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:73: error:<br>
'::time' has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:74: error:<br>
'::asctime' has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:75: error:<br>
'::ctime' has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:76: error:<br>
'::gmtime' has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:77: error:<br>
'::localtime' has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:78: error:<br>
'::strftime' has not been declared<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:<br>
In member function '_InIter std::time_get<_CharT,<br>
_InIter>::_M_extract_via_format(_InIter, _InIter, std::ios_base&,<br>
std::_Ios_Iostate&, tm*, const _CharT*) const':<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1794:<br>
error: invalid use of undefined type 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1801:<br>
error: invalid use of undefined type 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1809:<br>
error: invalid use of undefined type 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1816:<br>
error: invalid use of undefined type 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1828:<br>
error: invalid use of undefined type 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1835:<br>
error: invalid use of undefined type 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1838:<br>
error: invalid use of undefined type 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1850:<br>
error: invalid use of undefined type 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1855:<br>
error: invalid use of undefined type 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1863:<br>
error: invalid use of undefined type 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1867:<br>
error: invalid use of undefined type 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1887:<br>
error: invalid use of undefined type 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1923:<br>
error: invalid use of undefined type 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1931:<br>
error: invalid use of undefined type 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:<br>
In member function 'virtual _InIter std::time_get<_CharT,<br>
_InIter>::do_get_weekday(_InIter, _InIter, std::ios_base&,<br>
std::_Ios_Iostate&, tm*) const':<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:2157:<br>
error: invalid use of undefined type 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:<br>
In member function 'virtual _InIter std::time_get<_CharT,<br>
_InIter>::do_get_monthname(_InIter, _InIter, std::ios_base&,<br>
std::_Ios_Iostate&, tm*) const':<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:2203:<br>
error: invalid use of undefined type 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:<br>
In member function 'virtual _InIter std::time_get<_CharT,<br>
_InIter>::do_get_year(_InIter, _InIter, std::ios_base&, std::_Ios_Iostate&,<br>
tm*) const':<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:2230:<br>
error: invalid use of undefined type 'struct tm'<br>
/Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward<br>
declaration of 'struct tm'<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>