0

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?

polo
  • 23
  • 5
  • It looks like you are including it wrong. `cork.cpp` should not participate in build of your project. – user7860670 Nov 20 '17 at 09:19
  • @VTT, the way I tried to use the library is to include and bring all the header and source files that was in the example project of the (cork) library. After I excluded cork.cpp from build, another file which uses vec.h gives exact errors (files.cpp). Should I import it in another way? – polo Nov 20 '17 at 12:13
  • To utilize C++ libraries you need to add library header files path to the list of include directories and link library build artifacts (if any). There is no need to copy anything from that library into your project. – user7860670 Nov 20 '17 at 12:16
  • When I remove the source files and only keep the header files compiler gives this error: – polo Nov 20 '17 at 14:33
  • 1>QtGuiApplication2.obj : error LNK2019: unresolved external symbol "int __cdecl Files::readTriMesh(class std::basic_string,class std::allocator >,struct RawMesh *)" (?readTriMesh@Files@@YAHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAU?$RawMesh@UFileVertex@Files@@UFileTriangle@2@@@@Z) referenced in function "void __cdecl loadMesh(class std::basic_string,class std::allocator >,struct CorkTriMesh *)" – polo Nov 20 '17 at 14:34
  • Basically it is looking for the definitions. – polo Nov 20 '17 at 14:35
  • this means that you are not linking properly, see [What is an undefined reference/unresolved external symbol error and how do I fix it?](https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – user7860670 Nov 20 '17 at 14:36
  • @VTT, thanks but cork for windows does not have any .lib or .dll files to be included or linked to (and I dont know of any way to build them for windows, although for linux there is a make file which can be used. (https://github.com/gilbo/cork)), the example project uses only .h and .cpp and makes an exe file. so I edited the example file to fit my usage and was trying to use exactly the example inside my project!! – polo Nov 20 '17 at 15:27

1 Answers1

0

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

polo
  • 23
  • 5