Hi Matt, <br><br>Thanks a lot for your reply. I am now quite convinced that the xkeycheck.h file is used solely <br>by the C++ preprocessor which tests if any of the reserved words were redefined.<br><br>the failing part of xkeycheck.h looks like this:<br>
<br>#if defined(alignas) /* check C++ keywords */ \<br> || defined(alignof) \<br> || defined(asm) \<br> || defined(auto) \<br> || defined(bool) \<br> ....<br> || defined(enum) \<br> || defined(explicit) \<br>
<b> || defined(export) \</b><br> || defined(extern) \<br> ...<br> || defined(friend) \<br> ...<br> || defined(while)<br> #error keyword defined before including C++ standard header<br> #endif /* defined... */<br>
<br><br>After a bit of bisectionning of the list (of 72 items), I found the culprit.<br><br>Despite the failure of (in <b>....\ITK\src\Modules\ThirdParty\VNL\src\vxl\config\cmake\config\CMakeLists.txt</b> line 53)<br>
PERFORM_CMAKE_TEST(vxl_platform_tests.cxx VCL_HAS_EXPORT)<br><br>it is keyword <i><b>"</b><b>export" </b>that</i> the preprocessor protects (see <b>vcl_compiler.h</b> line 283<b>):<br>
<br>//</b> if the compiler doesn't understand "export", we just leave it out.<br>// gcc and SunPro 5.0 understand it, but they ignore it noisily.<br>#if !VCL_HAS_EXPORT||defined(VCL_EGCS)||defined(VCL_GCC_295)||defined(VCL_GCC_3)||defined(VCL_GCC_4)||defined(VCL_SUNPRO_CC_5)<br>
# define export /* ignore */<br>#endif<br> <br><br>A dirty hack that worked for me was to change the definition to<b> "__export</b>"<br>#if !VCL_HAS_EXPORT||defined(VCL_EGCS)||defined(VCL_GCC_295)||defined(VCL_GCC_3)||defined(VCL_GCC_4)||defined(VCL_SUNPRO_CC_5)<br>
# define __export /* ignore */<br>#endif<br>#if VCL_HAS_EXPORT<br># define __export export<br>#endif<br><br>and replace all used exports by __export in <br><b>...\ITK\src\Modules\ThirdParty\VNL\src\vxl\core\vnl\vnl_diag_matrix.h<br>
...</b><b>\ITK\src\Modules\ThirdParty\VNL\src\vxl\core\vnl\vnl_diag_matrix_fixed.h<br>...</b><b>\ITK\src\Modules\ThirdParty\VNL\src\vxl\core\vnl\vnl_sym_matrix.h</b><br><br>Here you can find the proposed patches that helped me to compile ITK4 with VC11:<br>
<a href="http://review.source.kitware.com/3478">http://review.source.kitware.com/3478</a><br><a href="http://review.source.kitware.com/3479">http://review.source.kitware.com/3479</a><br><br>Cheers, <br><br>Jan<br><br><br>
<b><br><br></b><div class="gmail_quote">On Fri, Dec 9, 2011 at 8:26 PM, Matt McCormick <span dir="ltr"><<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jan,<br>
<br>
I do not believe we have any dashboard builds of VC11.<br>
<br>
Can you please report the content of the file xkeycheck.h around line 124?<br>
<br>
Thanks,<br>
Matt<br>
<div><div><br>
On Fri, Dec 9, 2011 at 8:31 AM, Jan Margeta <<a href="mailto:jmargeta@gmail.com" target="_blank">jmargeta@gmail.com</a>> wrote:<br>
> Hi all ITK users,<br>
><br>
> When compiling project itkvcl (amon many others) I get errors from<br>
> xkeycheck.h<br>
><br>
> ...<br>
> 2>C:\Program Files (x86)\Microsoft Visual Studio<br>
> 11.0\VC\include\xkeycheck.h(124): fatal error C1189: #error : keyword<br>
> defined before including C++ standard header<br>
> 2> vcl_cmath.cxx<br>
> 2>C:\Program Files (x86)\Microsoft Visual Studio<br>
> 11.0\VC\include\xkeycheck.h(124): fatal error C1189: #error : keyword<br>
> defined before including C++ standard header<br>
> 2> vcl_cassert.cxx<br>
> ...<br>
><br>
> From the content of this file, I would guess that some extra #define<br>
> redefinition of an existing keyword is used somewhere.<br>
> Has anyone tackled this and fully compiled ITK4 on VC11?<br>
><br>
> Cheers,<br>
><br>
> Jan<br>
><br>
><br>
><br>
</div></div>> _____________________________________<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>
</blockquote></div>