<br>Hi Boris,<br><br>Thanks for sharing your findings.<br><br>This is interesting...<br><br>The only "time.h" file that I see in the ITK source tree is:<br><br> Insight/Utilities/vxl/vcl/vcl_sys/time.h<br>
<br>is that the file that you renamed as "ITKtime.h" ?<br><br><br> Please let us know,<br><br><br> Thanks<br><br><br> Luis<br><br><br>---------------------------------------------------------------------------------------<br>
<div class="gmail_quote">On Sun, Apr 11, 2010 at 11:54 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>
Hi Luis<br>
<br>
I got the same error when I simply created a new C++ command utility tool in<br>
xcode and tried to compile while including ITK files.<br>
<br>
HOWEVER, it seems to compile now once I changed the name of ITK's "time.h"<br>
file into "ITKtime.h" and recompiled the entire Xcode project that was<br>
produced with Cmake. Now both my Obj-C++ and C++ projects seem to compile<br>
fine. But I wonder, changing the file name from "time.h" to "ITKtime.h"<br>
should have definitely introduced errors, but it didn't. Which files use<br>
ITK's "time.h" file?<br>
<br>
Boris<br>
<div><div></div><div class="h5"><br>
Luis Ibanez wrote:<br>
><br>
> Hi Boris,<br>
><br>
> Thanks for sharing your findings.<br>
><br>
> More that "time.h" we probably should track<br>
> includes for "ctime", 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>
> '::clock_t' has not been declared<br>
> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:68: error:<br>
> '::tm'<br>
> has not been declared<br>
><br>
><br>
> The "ctime" header is included in ITK from<br>
> the following files:<br>
><br>
> Utilities/vxl/vcl/vcl_ctime.h:# include <ctime><br>
> Utilities/vxl/vcl/iso/vcl_ctime.h:#include <ctime><br>
><br>
><br>
> I'm not familiar with the iPhoneOS development environment....<br>
> so I'm just wondering if it doesn'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 "vcl_compiler.h"<br>
><br>
> // Purpose: provide access to the <time.h> standard C header.<br>
><br>
> #if !VCL_CXX_HAS_HEADER_CTIME || defined(VCL_METRO_WERKS)<br>
> # include <time.h><br>
> # define vcl_generic_ctime_STD /* */<br>
> # include "generic/vcl_ctime.h"<br>
> #elif defined(VCL_VC60)<br>
> # include <ctime><br>
> # define vcl_generic_ctime_STD /* */<br>
> # include "generic/vcl_ctime.h"<br>
> #else<br>
> # include "iso/vcl_ctime.h"<br>
> #endif<br>
><br>
> // ??<br>
> #ifndef VCL_WIN32<br>
> #include <sys/times.h><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<br>
> <<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>>wrote:<br>
><br>
>><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/" target="_blank">http://www.cplusplus.com/reference/clibrary/ctime/clock/</a><br>
>><br>
>> /* clock example: countdown */<br>
>> #include <stdio.h><br>
>> #include <time.h><br>
>><br>
>> void wait ( int seconds )<br>
>> {<br>
>> clock_t endwait;<br>
>> endwait = clock () + seconds * CLOCKS_PER_SEC ;<br>
>> while (clock() < endwait) {}<br>
>><br>
>> }<br>
>><br>
>> int main ()<br>
>> {<br>
>> int n;<br>
>> printf ("Starting countdown...\n");<br>
>> for (n=10; n>0; n--)<br>
>> {<br>
>> printf ("%d\n",n);<br>
>> wait (1);<br>
>><br>
>> }<br>
>> printf ("FIRE!!!\n");<br>
>> return 0;<br>
>> }<br>
>><br>
>><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>
>> ---------------------------------------------------------------------------------------------------<br>
>><br>
>> On Fri, Apr 9, 2010 at 10:24 PM, Boris Shabash<br>
>> <<a href="mailto:bshabash@hotmail.com">bshabash@hotmail.com</a>>wrote:<br>
>><br>
>>><br>
>>> Hello everyone<br>
>>><br>
>>> I am currently trying to compile ITK on the iphoneOS and for that I need<br>
>>> 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<br>
>>> 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:<br>
>>> '::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>
>>><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>
>>><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>
>>><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>
>>><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>
>>><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>
>>><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>
>>><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>
>>><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>
>>><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>
>>><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>
>>><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>
>>><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>
>>><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>
>>><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>
>>><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>
>>><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>
>>><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>
>>><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>
>>><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>
>>><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&,<br>
>>> std::_Ios_Iostate&,<br>
>>> tm*) const':<br>
>>><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:<br>
>>> <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>
>>><br>
>><br>
>><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>
><br>
><br>
<br>
</div></div><font color="#888888">--<br>
View this message in context: <a href="http://old.nabble.com/ITK-with-Xcode-tp28199033p28213619.html" target="_blank">http://old.nabble.com/ITK-with-Xcode-tp28199033p28213619.html</a><br>
</font><div><div></div><div class="h5">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>
</div></div></blockquote></div><br>