[Insight-users] ITK with Xcode
Boris Shabash
bshabash at hotmail.com
Sun Apr 11 03:56:19 EDT 2010
Ya, this example works just fine.
I noticed that ITK has a header called "time.h" as well, could that be
affecting something?
Boris
Luis Ibanez wrote:
>
> Hi Boris,
>
> It would seem that "clock_t" is not defined in the
> expected location in your platform.
>
> Please try the following example first
> (independently of ITK):
>
>
> (taken from):
> http://www.cplusplus.com/reference/clibrary/ctime/clock/
>
> /* clock example: countdown */
> #include <stdio.h>
> #include <time.h>
>
> void wait ( int seconds )
> {
> clock_t endwait;
> endwait = clock () + seconds * CLOCKS_PER_SEC ;
> while (clock() < endwait) {}
> }
>
> int main ()
> {
> int n;
> printf ("Starting countdown...\n");
> for (n=10; n>0; n--)
> {
> printf ("%d\n",n);
> wait (1);
> }
> printf ("FIRE!!!\n");
> return 0;
> }
>
>
>
> And let us know if it can be compiled in your platform.
>
>
> Thanks
>
>
> Luis
>
>
> ---------------------------------------------------------------------------------------------------
> On Fri, Apr 9, 2010 at 10:24 PM, Boris Shabash <bshabash at hotmail.com>
> wrote:
>
>>
>> Hello everyone
>>
>> I am currently trying to compile ITK on the iphoneOS and for that I need
>> to
>> be working in the Xcode environment.
>>
>> I've downloaded ITK and Cmake and created an Xcode project for ITK using
>> Cmake.
>> Now for the purpose of testing I've created a new C++ command line
>> utility
>> tool and included all the paths to find the libraries and headers.
>>
>> However, when I try to compile the command line utility tool I get the
>> following error from including the ITK paths:
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:66: error:
>> '::clock_t' has not been declared
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:68: error:
>> '::tm'
>> has not been declared
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:70: error:
>> '::clock' has not been declared
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:71: error:
>> '::difftime' has not been declared
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:72: error:
>> '::mktime' has not been declared
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:73: error:
>> '::time' has not been declared
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:74: error:
>> '::asctime' has not been declared
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:75: error:
>> '::ctime' has not been declared
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:76: error:
>> '::gmtime' has not been declared
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:77: error:
>> '::localtime' has not been declared
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/ctime:78: error:
>> '::strftime' has not been declared
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:
>> In member function '_InIter std::time_get<_CharT,
>> _InIter>::_M_extract_via_format(_InIter, _InIter, std::ios_base&,
>> std::_Ios_Iostate&, tm*, const _CharT*) const':
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1794:
>> error: invalid use of undefined type 'struct tm'
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward
>> declaration of 'struct tm'
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1801:
>> error: invalid use of undefined type 'struct tm'
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward
>> declaration of 'struct tm'
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1809:
>> error: invalid use of undefined type 'struct tm'
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward
>> declaration of 'struct tm'
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1816:
>> error: invalid use of undefined type 'struct tm'
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward
>> declaration of 'struct tm'
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1828:
>> error: invalid use of undefined type 'struct tm'
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward
>> declaration of 'struct tm'
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1835:
>> error: invalid use of undefined type 'struct tm'
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward
>> declaration of 'struct tm'
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1838:
>> error: invalid use of undefined type 'struct tm'
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward
>> declaration of 'struct tm'
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1850:
>> error: invalid use of undefined type 'struct tm'
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward
>> declaration of 'struct tm'
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1855:
>> error: invalid use of undefined type 'struct tm'
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward
>> declaration of 'struct tm'
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1863:
>> error: invalid use of undefined type 'struct tm'
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward
>> declaration of 'struct tm'
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1867:
>> error: invalid use of undefined type 'struct tm'
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward
>> declaration of 'struct tm'
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1887:
>> error: invalid use of undefined type 'struct tm'
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward
>> declaration of 'struct tm'
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1923:
>> error: invalid use of undefined type 'struct tm'
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward
>> declaration of 'struct tm'
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:1931:
>> error: invalid use of undefined type 'struct tm'
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward
>> declaration of 'struct tm'
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:
>> In member function 'virtual _InIter std::time_get<_CharT,
>> _InIter>::do_get_weekday(_InIter, _InIter, std::ios_base&,
>> std::_Ios_Iostate&, tm*) const':
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:2157:
>> error: invalid use of undefined type 'struct tm'
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward
>> declaration of 'struct tm'
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:
>> In member function 'virtual _InIter std::time_get<_CharT,
>> _InIter>::do_get_monthname(_InIter, _InIter, std::ios_base&,
>> std::_Ios_Iostate&, tm*) const':
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:2203:
>> error: invalid use of undefined type 'struct tm'
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward
>> declaration of 'struct tm'
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:
>> In member function 'virtual _InIter std::time_get<_CharT,
>> _InIter>::do_get_year(_InIter, _InIter, std::ios_base&,
>> std::_Ios_Iostate&,
>> tm*) const':
>>
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/bits/locale_facets.tcc:2230:
>> error: invalid use of undefined type 'struct tm'
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/wchar.h:152: error: forward
>> declaration of 'struct tm'
>>
>> What is going on?
>> --
>> View this message in context:
>> http://old.nabble.com/ITK-with-Xcode-tp28199033p28199033.html
>> Sent from the ITK - Users mailing list archive at Nabble.com.
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
--
View this message in context: http://old.nabble.com/ITK-with-Xcode-tp28199033p28207024.html
Sent from the ITK - Users mailing list archive at Nabble.com.
More information about the Insight-users
mailing list