Better build the OTB projection using cmake in windows in the superbuild way. The 在 2016年9月21日星期三 UTC+8下午2:29:26,Yoram Elichai写道: > > I build otb from source xdk, > > now I try to build my first otb application using visual studio. : > StreamingMeanShiftSegmentation.cxx > > I get the following error: > > > StreamingMeanShiftSegmentation.cxx > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(214): error C2065: > '__asm__' : undeclared identifier > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(214): error C2146: > syntax error : missing ';' before identifier '__volatile__' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(214): error C2143: > syntax error : missing ')' before ':' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(214): error C2059: > syntax error : ')' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(214): error C3861: > '__volatile__': identifier not found > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(222): error C2065: > '__asm__' : undeclared identifier > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(222): error C2146: > syntax error : missing ';' before identifier '__volatile__' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(222): error C2143: > syntax error : missing ')' before ':' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(222): error C2059: > syntax error : ')' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(222): error C3861: > '__volatile__': identifier not found > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(232): error C2065: > '__asm__' : undeclared identifier > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(232): error C2146: > syntax error : missing ';' before identifier '__volatile__' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(232): error C2143: > syntax error : missing ')' before ':' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(232): error C2059: > syntax error : ')' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(232): error C3861: > '__volatile__': identifier not found > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(1178): error C2065: > '__asm__' : undeclared identifier > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(1178): error C2146: > syntax error : missing ';' before identifier '__volatile__' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(1179): error C2143: > syntax error : missing ')' before ':' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(1179): error C2059: > syntax error : ')' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\math.h(1178): error C3861: > '__volatile__': identifier not found > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(167): error C2144: > syntax error : 'int' should be preceded by ';' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(167): warning C4091: > '__declspec(nothrow)' : ignored on left of 'int' when no variable is > declared > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(170): error C2144: > syntax error : 'int' should be preceded by ';' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(170): warning C4091: > '__declspec(nothrow)' : ignored on left of 'int' when no variable is > declared > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(173): error C2144: > syntax error : 'int' should be preceded by ';' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(173): warning C4091: > '__declspec(nothrow)' : ignored on left of 'int' when no variable is > declared > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(176): error C2144: > syntax error : 'int' should be preceded by ';' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(176): warning C4091: > '__declspec(nothrow)' : ignored on left of 'int' when no variable is > declared > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(179): error C2144: > syntax error : 'int' should be preceded by ';' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(179): warning C4091: > '__declspec(nothrow)' : ignored on left of 'int' when no variable is > declared > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(182): error C2144: > syntax error : 'int' should be preceded by ';' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(182): warning C4091: > '__declspec(nothrow)' : ignored on left of 'int' when no variable is > declared > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(185): error C2144: > syntax error : 'int' should be preceded by ';' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(185): warning C4091: > '__declspec(nothrow)' : ignored on left of 'int' when no variable is > declared > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(188): error C2144: > syntax error : 'int' should be preceded by ';' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(188): warning C4091: > '__declspec(nothrow)' : ignored on left of 'int' when no variable is > declared > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(399): error C2062: > type 'int' unexpected > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(400): error C2143: > syntax error : missing ';' before '{' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(400): error C2447: '{' > : missing function header (old-style formal list?) > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(406): error C2062: > type 'int' unexpected > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(407): error C2143: > syntax error : missing ';' before '{' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(407): error C2447: '{' > : missing function header (old-style formal list?) > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(412): error C2062: > type 'int' unexpected > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(413): error C2143: > syntax error : missing ';' before '{' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(413): error C2447: '{' > : missing function header (old-style formal list?) > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(543): error C2062: > type 'int' unexpected > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(544): error C2143: > syntax error : missing ';' before '{' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(544): error C2447: '{' > : missing function header (old-style formal list?) > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(553): error C2062: > type 'int' unexpected > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(554): error C2143: > syntax error : missing ';' before '{' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(554): error C2447: '{' > : missing function header (old-style formal list?) > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(735): error C2062: > type 'int' unexpected > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(736): error C2143: > syntax error : missing ';' before '{' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(736): error C2447: '{' > : missing function header (old-style formal list?) > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(742): error C2062: > type 'int' unexpected > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(743): error C2143: > syntax error : missing ';' before '{' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(743): error C2447: '{' > : missing function header (old-style formal list?) > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(748): error C2062: > type 'int' unexpected > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(749): error C2143: > syntax error : missing ';' before '{' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(749): error C2447: '{' > : missing function header (old-style formal list?) > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(801): error C2062: > type 'int' unexpected > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(802): error C2143: > syntax error : missing ';' before '{' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(802): error C2447: '{' > : missing function header (old-style formal list?) > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(811): error C2062: > type 'int' unexpected > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(812): error C2143: > syntax error : missing ';' before '{' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdio.h(812): error C2447: '{' > : missing function header (old-style formal list?) > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\swprintf.inl(23): error C2062: > type 'int' unexpected > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\swprintf.inl(24): error C2143: > syntax error : missing ';' before '{' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\swprintf.inl(24): error C2447: > '{' : missing function header (old-style formal list?) > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\swprintf.inl(30): error C2062: > type 'int' unexpected > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\swprintf.inl(31): error C2143: > syntax error : missing ';' before '{' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\swprintf.inl(31): error C2447: > '{' : missing function header (old-style formal list?) > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\swprintf.inl(47): error C2062: > type 'int' unexpected > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\swprintf.inl(48): error C2143: > syntax error : missing ';' before '{' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\swprintf.inl(48): error C2447: > '{' : missing function header (old-style formal list?) > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\swprintf.inl(58): error C2062: > type 'int' unexpected > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\swprintf.inl(59): error C2143: > syntax error : missing ';' before '{' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\swprintf.inl(59): error C2447: > '{' : missing function header (old-style formal list?) > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdlib.h(306): error C2059: > syntax error : '__declspec(nothrow)' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdlib.h(307): error C2059: > syntax error : '__declspec(nothrow)' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdlib.h(311): error C2144: > syntax error : 'int' should be preceded by ';' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdlib.h(311): warning C4091: > '__declspec(noreturn)' : ignored on left of 'int' when no variable is > declared > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdlib.h(314): error C2381: > '_Exit' : redefinition; __declspec(noreturn) differs > 1> D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdlib.h(311) : see > declaration of '_Exit' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdlib.h(314): error C3861: > '_exit': identifier not found > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdlib.h(320): error C2059: > syntax error : '__declspec(noreturn)' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdlib.h(411): error C2059: > syntax error : '__declspec(nothrow)' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdlib.h(412): error C2059: > syntax error : '__declspec(nothrow)' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdlib.h(414): error C2059: > syntax error : '__declspec(nothrow)' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdlib.h(418): error C2059: > syntax error : '__declspec(nothrow)' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdlib.h(601): error C2144: > syntax error : 'int' should be preceded by ';' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdlib.h(601): warning C4091: > '' : ignored on left of 'int' when no variable is declared > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdlib.h(603): error C2144: > syntax error : 'int' should be preceded by ';' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdlib.h(603): warning C4091: > '' : ignored on left of 'int' when no variable is declared > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdlib.h(604): error C2144: > syntax error : 'int' should be preceded by ';' > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\stdlib.h(604): warning C4091: > '' : ignored on left of 'int' when no variable is declared > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\malloc.h(147): error C2065: > '_ALLOCA_S_MARKER_SIZE' : undeclared identifier > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\malloc.h(166): error C2065: > '_ALLOCA_S_MARKER_SIZE' : undeclared identifier > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\cstdlib(21): error C2039: 'abort' : is not a member of > '`global namespace'' > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\cstdlib(21): error C2873: 'abort' : symbol cannot be used > in a using-declaration > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\cstdlib(24): error C2039: 'exit' : is not a member of > '`global namespace'' > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\cstdlib(24): error C2873: 'exit' : symbol cannot be used in > a using-declaration > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\cstdlib(28): error C2039: '__strtod' : is not a member of > '`global namespace'' > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\cstdlib(28): error C2873: '__strtod' : symbol cannot be > used in a using-declaration > 1>D:\_work\_otb\OTB-5.5.0-xdk-win64\include\eh.h(29): error C2039: > 'type_info' : is not a member of 'std' > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\exception(96): error C2146: syntax error : missing ';' > before identifier 'exception' > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\exception(96): error C4430: missing type specifier - int > assumed. Note: C++ does not support default-int > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\exception(97): error C2146: syntax error : missing ';' > before identifier 'exception' > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\exception(97): error C2071: > 'std::exception::__CLR_OR_THIS_CALL' : illegal storage class > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\exception(97): error C4430: missing type specifier - int > assumed. Note: C++ does not support default-int > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\exception(98): error C2146: syntax error : missing ';' > before identifier 'exception' > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\exception(98): error C4430: missing type specifier - int > assumed. Note: C++ does not support default-int > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\exception(99): error C2146: syntax error : missing ';' > before identifier 'exception' > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\exception(99): error C4430: missing type specifier - int > assumed. Note: C++ does not support default-int > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\exception(100): error C2143: syntax error : missing ';' > before '=' > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\exception(100): error C4430: missing type specifier - int > assumed. Note: C++ does not support default-int > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\exception(101): error C2143: syntax error : missing ';' > before '~' > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\exception(101): error C2433: > 'std::exception::__CLR_OR_THIS_CALL' : 'virtual' not permitted on data > declarations > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\exception(101): error C4430: missing type specifier - int > assumed. Note: C++ does not support default-int > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\exception(102): error C2146: syntax error : missing ';' > before identifier 'what' > 1>C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\include\exception(102): fatal error C1003: error count exceeds 100; > stopping compilation > > > what I do wrong? It is possible ? > include\math.h as understand is park of mingw-w64 > There are some macro that need to be set? > > Thanks, > yoram >
-- -- Check the OTB FAQ at http://www.orfeo-toolbox.org/FAQ.html You received this message because you are subscribed to the Google Groups "otb-users" group. To post to this group, send email to otb-users@googlegroups.com To unsubscribe from this group, send email to otb-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/otb-users?hl=en --- You received this message because you are subscribed to the Google Groups "otb-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to otb-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.