[Insight-users] [ITK-USER]Compile ITK3.20.1 with VS2012

Bradley Lowekamp blowekamp at mail.nih.gov
Wed May 29 09:33:52 EDT 2013


Hi,

Why no upgrade to ITK v4?

ITK v3.20 was released in 2010, well before Visual Studio 2012. So it should be no surprise it does not work with it. I believe VS 2010 should work with it, and VS9, and VS8, and VS7....


Brad



On May 28, 2013, at 10:41 PM, JX NIE <njx937 at gmail.com> wrote:

> Hi Everyone,
>     I have tried to compile ITK(version 3.20.1 ) with VS2012, but failed.
>     It has ended up with a lot of  Redifine errors as follow.
>    Could you please tell me how to solve this compile problem.
>    Regards,
> 
> NIE JUNXIAO
> 
>  
> >C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(242): fatal error C1189: #error :  The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.
> 
> 	1	IntelliSense: #error directive: The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h	242
> 	2	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\sal.h	2367
> 	3	IntelliSense: expected a declaration	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vadefs.h	139
> 	4	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	437
> 	5	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	446
> 	6	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	464
> 	7	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	475
> 	8	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	476
> 	9	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	497
> 	10	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	501
> 	11	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	506
> 	12	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	514
> 	13	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	571
> 	14	IntelliSense: attribute "noreturn" does not apply here	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	572
> 	15	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	572
> 	16	IntelliSense: attribute "noreturn" does not apply here	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	575
> 	17	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	576
> 	18	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	1979
> 	19	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	1980
> 	20	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	1981
> 	21	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	1982
> 	22	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	1983
> 	23	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	1985
> 	24	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	1992
> 	25	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	1999
> 	26	IntelliSense: expected a declaration	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\crtdefs.h	2023
> 	27	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	510
> 	28	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	528
> 	29	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	529
> 	30	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	542
> 	31	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	576
> 	32	IntelliSense: invalid destructor declaration	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	577
> 	33	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	583
> 	34	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	585
> 	35	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	586
> 	36	IntelliSense: explicit type is missing ('int' assumed)	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	588
> 	37	IntelliSense: identifier "EMIT" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	588
> 	38	IntelliSense: function "_Lockit" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	589
> 	39	IntelliSense: reference variable "EMIT" requires an initializer	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	589
> 	40	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	591
> 	41	IntelliSense: expected a declaration	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	606
> 	42	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	693
> 	43	IntelliSense: expected a declaration	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	726
> 	44	IntelliSense: expected a declaration	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	729
> 	45	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	740
> 	46	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h	741
> 	47	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	23
> 	48	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	47
> 	49	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	48
> 	50	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	49
> 	51	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	50
> 	52	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	54
> 	53	IntelliSense: identifier "errno_t" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	56
> 	54	IntelliSense: variable "memcpy_s" may not be initialized	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	56
> 	55	IntelliSense: expected a ')'	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	56
> 	56	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	93
> 	57	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	97
> 	58	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	98
> 	59	IntelliSense: identifier "errno_t" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	103
> 	60	IntelliSense: variable "_strset_s" may not be initialized	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	103
> 	61	IntelliSense: expected a ')'	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	103
> 	62	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	104
> 	63	IntelliSense: identifier "errno_t" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	107
> 	64	IntelliSense: variable "strcpy_s" may not be initialized	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	107
> 	65	IntelliSense: expected a ')'	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	107
> 	66	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	109
> 	67	IntelliSense: identifier "errno_t" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	112
> 	68	IntelliSense: variable "strcat_s" may not be initialized	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	112
> 	69	IntelliSense: expected a ')'	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	112
> 	70	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	114
> 	71	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	116
> 	72	IntelliSense: expected a ')'	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	117
> 	73	IntelliSense: variable "strnlen" may not be initialized	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	121
> 	74	IntelliSense: expected a ')'	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	121
> 	75	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	123
> 	76	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	135
> 	77	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	142
> 	78	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	148
> 	79	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	149
> 	80	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	150
> 	81	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	151
> 	82	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	152
> 	83	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	153
> 	84	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	154
> 	85	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	155
> 	86	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	156
> 	87	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	157
> 	88	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	158
> 	89	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	159
> 	90	IntelliSense: variable "strcspn" may not be initialized	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	160
> 	91	IntelliSense: expected a ')'	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	160
> 	92	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	161
> 	93	IntelliSense: identifier "errno_t" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	162
> 	94	IntelliSense: variable "_strerror_s" may not be initialized	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	162
> 	95	IntelliSense: expected a ')'	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	162
> 	96	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	163
> 	97	IntelliSense: identifier "errno_t" is undefined	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	166
> 	98	IntelliSense: variable "strerror_s" may not be initialized	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	166
> 	99	IntelliSense: expected a ')'	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	166
> 	100	IntelliSense: variable "EMIT" is not a type name	c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h	168
>  
> <CMakeCache.txt>_____________________________________
> 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.php
> 
> 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



More information about the Insight-users mailing list