c++templatesmsvc14

C++ unrecognizable template declaration when using 2 libraries in the same project (Cork+VTK)


I want to use cork library (https://github.com/gilbo/cork) to perform boolean operations on meshes, and the library compiles and runs fine in a seperate project in MSVC2015 visual C++ on windows7 64x.

When I include cork into my current project which is using other libraries I get these errors:

1>------ Rebuild All started: Project: QtGuiApplication2, Configuration: Release x64 ------
1>  Moc'ing QtGuiApplication2.h...
1>  Uic'ing QtGuiApplication2.ui...
1>  Rcc'ing QtGuiApplication2.qrc...
1>RCC : warning : No resources in 'E:\C++\VS2013 projects\QtGuiApplication32015\QtGuiApplication2\QtGuiApplication2.qrc'.
1>
1>  cork.cpp
1>C:\cork\src\math\vec.h(98): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(98): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(98): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(98): error C2923: 'Vec2': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(98): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(100): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(100): error C2923: 'Vec2': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(100): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(100): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(100): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(123): warning C4003: not enough actual parameters for macro 'max'
1>C:\cork\src\math\vec.h(123): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(123): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(123): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(125): warning C4003: not enough actual parameters for macro 'min'
1>C:\cork\src\math\vec.h(125): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(125): error C2923: 'Vec2': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(125): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(125): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(203): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(203): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(203): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(203): error C2923: 'Vec3': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(203): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(205): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(205): error C2923: 'Vec3': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(205): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(205): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(205): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(230): warning C4003: not enough actual parameters for macro 'max'
1>C:\cork\src\math\vec.h(230): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(230): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(230): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(232): warning C4003: not enough actual parameters for macro 'min'
1>C:\cork\src\math\vec.h(232): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(232): error C2923: 'Vec3': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(232): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(232): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(313): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(313): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(313): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(313): error C2923: 'Vec4': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(313): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(315): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(315): error C2923: 'Vec4': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(315): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(315): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(315): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(339): warning C4003: not enough actual parameters for macro 'max'
1>C:\cork\src\math\vec.h(339): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(339): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(339): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(341): warning C4003: not enough actual parameters for macro 'min'
1>C:\cork\src\math\vec.h(341): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(341): error C2923: 'Vec4': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(341): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(341): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(481): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(481): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(481): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(481): error C2923: 'Vec2': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(481): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(486): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(486): error C2923: 'Vec2': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(486): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(486): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(486): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(486): error C2143: syntax error: missing ';' before '{'
1>C:\cork\src\math\vec.h(486): error C2447: '{': missing function header (old-style formal list?)
1>C:\cork\src\math\vec.h(526): warning C4003: not enough actual parameters for macro 'max'
1>C:\cork\src\math\vec.h(526): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(526): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(526): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(530): warning C4003: not enough actual parameters for macro 'min'
1>C:\cork\src\math\vec.h(530): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(530): error C2923: 'Vec2': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(530): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(530): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(530): error C2143: syntax error: missing ';' before '{'
1>C:\cork\src\math\vec.h(530): error C2447: '{': missing function header (old-style formal list?)
1>C:\cork\src\math\vec.h(629): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(629): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(629): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(629): error C2923: 'Vec3': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(629): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(635): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(635): error C2923: 'Vec3': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(635): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(635): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(635): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(635): error C2143: syntax error: missing ';' before '{'
1>C:\cork\src\math\vec.h(635): error C2447: '{': missing function header (old-style formal list?)
1>C:\cork\src\math\vec.h(687): warning C4003: not enough actual parameters for macro 'max'
1>C:\cork\src\math\vec.h(687): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(687): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(687): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(691): warning C4003: not enough actual parameters for macro 'min'
1>C:\cork\src\math\vec.h(691): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(691): error C2923: 'Vec3': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(691): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(691): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(691): error C2143: syntax error: missing ';' before '{'
1>C:\cork\src\math\vec.h(691): error C2447: '{': missing function header (old-style formal list?)
1>C:\cork\src\math\vec.h(795): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(795): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(795): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(795): error C2923: 'Vec4': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(795): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(802): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(802): error C2923: 'Vec4': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(802): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(802): fatal error C1003: error count exceeds 100; stopping compilation
1>  files.cpp
1>C:\cork\src\math\vec.h(98): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(98): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(98): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(98): error C2923: 'Vec2': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(98): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(100): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(100): error C2923: 'Vec2': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(100): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(100): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(100): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(123): warning C4003: not enough actual parameters for macro 'max'
1>C:\cork\src\math\vec.h(123): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(123): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(123): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(125): warning C4003: not enough actual parameters for macro 'min'
1>C:\cork\src\math\vec.h(125): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(125): error C2923: 'Vec2': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(125): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(125): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(203): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(203): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(203): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(203): error C2923: 'Vec3': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(203): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(205): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(205): error C2923: 'Vec3': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(205): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(205): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(205): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(230): warning C4003: not enough actual parameters for macro 'max'
1>C:\cork\src\math\vec.h(230): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(230): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(230): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(232): warning C4003: not enough actual parameters for macro 'min'
1>C:\cork\src\math\vec.h(232): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(232): error C2923: 'Vec3': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(232): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(232): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(313): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(313): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(313): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(313): error C2923: 'Vec4': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(313): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(315): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(315): error C2923: 'Vec4': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(315): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(315): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(315): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(339): warning C4003: not enough actual parameters for macro 'max'
1>C:\cork\src\math\vec.h(339): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(339): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(339): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(341): warning C4003: not enough actual parameters for macro 'min'
1>C:\cork\src\math\vec.h(341): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(341): error C2923: 'Vec4': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(341): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(341): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(481): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(481): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(481): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(481): error C2923: 'Vec2': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(481): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(486): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(486): error C2923: 'Vec2': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(486): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(486): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(486): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(486): error C2143: syntax error: missing ';' before '{'
1>C:\cork\src\math\vec.h(486): error C2447: '{': missing function header (old-style formal list?)
1>C:\cork\src\math\vec.h(526): warning C4003: not enough actual parameters for macro 'max'
1>C:\cork\src\math\vec.h(526): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(526): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(526): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(530): warning C4003: not enough actual parameters for macro 'min'
1>C:\cork\src\math\vec.h(530): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(530): error C2923: 'Vec2': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(530): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(530): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(530): error C2143: syntax error: missing ';' before '{'
1>C:\cork\src\math\vec.h(530): error C2447: '{': missing function header (old-style formal list?)
1>C:\cork\src\math\vec.h(629): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(629): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(629): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(629): error C2923: 'Vec3': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(629): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(635): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(635): error C2923: 'Vec3': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(635): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(635): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(635): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(635): error C2143: syntax error: missing ';' before '{'
1>C:\cork\src\math\vec.h(635): error C2447: '{': missing function header (old-style formal list?)
1>C:\cork\src\math\vec.h(687): warning C4003: not enough actual parameters for macro 'max'
1>C:\cork\src\math\vec.h(687): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(687): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(687): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(691): warning C4003: not enough actual parameters for macro 'min'
1>C:\cork\src\math\vec.h(691): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(691): error C2923: 'Vec3': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(691): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(691): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(691): error C2143: syntax error: missing ';' before '{'
1>C:\cork\src\math\vec.h(691): error C2447: '{': missing function header (old-style formal list?)
1>C:\cork\src\math\vec.h(795): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(795): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(795): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(795): error C2923: 'Vec4': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(795): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(802): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(802): error C2923: 'Vec4': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(802): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(802): fatal error C1003: error count exceeds 100; stopping compilation
1>  ifs.cpp
1>C:\cork\src\math\vec.h(98): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(98): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(98): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(98): error C2923: 'Vec2': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(98): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(100): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(100): error C2923: 'Vec2': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(100): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(100): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(100): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(123): warning C4003: not enough actual parameters for macro 'max'
1>C:\cork\src\math\vec.h(123): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(123): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(123): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(125): warning C4003: not enough actual parameters for macro 'min'
1>C:\cork\src\math\vec.h(125): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(125): error C2923: 'Vec2': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(125): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(125): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(203): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(203): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(203): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(203): error C2923: 'Vec3': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(203): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(205): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(205): error C2923: 'Vec3': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(205): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(205): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(205): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(230): warning C4003: not enough actual parameters for macro 'max'
1>C:\cork\src\math\vec.h(230): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(230): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(230): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(232): warning C4003: not enough actual parameters for macro 'min'
1>C:\cork\src\math\vec.h(232): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(232): error C2923: 'Vec3': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(232): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(232): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(313): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(313): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(313): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(313): error C2923: 'Vec4': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(313): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(315): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(315): error C2923: 'Vec4': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(315): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(315): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(315): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(339): warning C4003: not enough actual parameters for macro 'max'
1>C:\cork\src\math\vec.h(339): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(339): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(339): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(341): warning C4003: not enough actual parameters for macro 'min'
1>C:\cork\src\math\vec.h(341): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(341): error C2923: 'Vec4': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(341): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(341): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(481): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(481): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(481): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(481): error C2923: 'Vec2': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(481): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(486): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(486): error C2923: 'Vec2': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(486): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(486): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(486): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(486): error C2143: syntax error: missing ';' before '{'
1>C:\cork\src\math\vec.h(486): error C2447: '{': missing function header (old-style formal list?)
1>C:\cork\src\math\vec.h(526): warning C4003: not enough actual parameters for macro 'max'
1>C:\cork\src\math\vec.h(526): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(526): error C2059: syntax error: 'const'
1>C:\cork\src\math\vec.h(526): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(530): warning C4003: not enough actual parameters for macro 'min'
1>C:\cork\src\math\vec.h(530): error C2065: 'N': undeclared identifier
1>C:\cork\src\math\vec.h(530): error C2923: 'Vec2': 'N' is not a valid template type argument for parameter 'N'
1>C:\cork\src\math\vec.h(530): error C2988: unrecognizable template declaration/definition
1>C:\cork\src\math\vec.h(530): error C2059: syntax error: ')'
1>C:\cork\src\math\vec.h(530): error C2143: syntax error: missing ';' before '{'
1>C:\cork\src\math\vec.h(530): error C2447: '{': missing function header (old-style formal list?)
1>C:\cork\src\math\vec.h(629): error C2988: unrecognizable template declaration/definition
1>  quantization.cpp
1>  log.cpp
1>  timer.cpp
1>  moc_QtGuiApplication2.cpp
1>  main.cpp
1>  mldivide_Cxx.cpp
1>  mldivide_Cxx_initialize.cpp
1>  mldivide_Cxx_terminate.cpp
1>  QtGuiApplication2.cpp
1>  rtGetInf.cpp
1>  rtGetNaN.cpp
1>  rt_nonfinite.cpp
1>  Test_Move.cpp
1>  Generating Code...
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

The code at which the error appears is as:

template<class N>
inline Vec2<N> min(const Vec2<N> &lhs, const Vec2<N> &rhs);

Any idea why there is a coflict between templates and how I can solve this?


Solution

  • The problem was not importing properties in MSVC under C++ -> Processor.