Class Template in Header file giving me lots of errors - c++

This following code:
main.cpp:
#include <iostream>
#include <list>
#include <map>
#include <string>
#include "core_table.h"
using std::cout;
using std::endl;
int main() {
core_table<int, int> t;
cout << sizeof(t) << endl;
return 0;
}
core_table.h:
#ifndef CORE_TABLE_H
#define CORE_TABLE_H
template <typename key, typename value>
class core_table {
std::list<key, value> l;
std::map<key, value> m;
public:
};
#endif // !CORE_TABLE_H
is giving me this list of errors in Visual Studio 2017. I don't know how to solve it, since this is my first time trying to structure my code in multiple files.
Severity Code Description Project File Line Suppression State
Error C2516 '_Alloc': is not a legal base class ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 984
Error C2825 '_Alloc': must be a class or namespace when followed by '::' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 659
Error C2510 '_Alloc': left of '::' must be a class/struct/union ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 659
Error C3646 'value_type': unknown override specifier ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 659
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 659
Error C2825 '_Ty': must be a class or namespace when followed by '::' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 323
Error C2510 '_Ty': left of '::' must be a class/struct/union ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 323
Error C2143 syntax error: missing ';' before '*' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 323
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 323
Error C2238 unexpected token(s) preceding ';' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 323
Error C2039 'type': is not a member of 'std::_Get_pointer_type<_Alloc,void>' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 661
Error C3646 'pointer': unknown override specifier ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 662
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 662
Error C2039 'type': is not a member of 'std::_Get_pointer_type<_Alloc,void>' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 337
Error C3646 '_Ptrty': unknown override specifier ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 337
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 337
Error C2825 '_Ty': must be a class or namespace when followed by '::' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 338
Error C2510 '_Ty': left of '::' must be a class/struct/union ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 338
Error C3646 '_Valty': unknown override specifier ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 338
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 338
Error C2065 '_Ptrty': undeclared identifier ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 339
Error C2923 'std::pointer_traits': '_Ptrty' is not a valid template type argument for parameter '_Ty' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 339
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 339
Error C2146 syntax error: missing '>' before identifier '_Valty' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 339
Error C2903 'rebind': symbol is neither a class template nor a function template ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 339
Error C2371 'std::_Get_const_pointer_type<_Alloc,void>::type': redefinition; different basic types ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 339
Error C2039 'type': is not a member of 'std::_Get_pointer_type<_Alloc,void>' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 353
Error C3646 '_Ptrty': unknown override specifier ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 353
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 353
Error C2065 '_Ptrty': undeclared identifier ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 354
Error C2923 'std::pointer_traits': '_Ptrty' is not a valid template type argument for parameter '_Ty' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 354
Error C2903 'rebind': symbol is neither a class template nor a function template ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 354
Error C2371 'std::_Get_void_pointer_type<_Alloc,void>::type': redefinition; different basic types ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 354
Error C2039 'type': is not a member of 'std::_Get_pointer_type<_Alloc,void>' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 368
Error C3646 '_Ptrty': unknown override specifier ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 368
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 368
Error C2065 '_Ptrty': undeclared identifier ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 369
Error C2923 'std::pointer_traits': '_Ptrty' is not a valid template type argument for parameter '_Ty' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 369
Error C2903 'rebind': symbol is neither a class template nor a function template ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 369
Error C2371 'std::_Get_const_void_pointer_type<_Alloc,void>::type': redefinition; different basic types ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 369
Error C2039 'type': is not a member of 'std::_Get_pointer_type<_Alloc,void>' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 383
Error C3646 '_Ptrty': unknown override specifier ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 383
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 383
Error C2065 '_Ptrty': undeclared identifier ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 384
Error C2923 'std::pointer_traits': '_Ptrty' is not a valid template type argument for parameter '_Ty' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 384
Error C2955 'std::pointer_traits': use of class template requires template argument list ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 384
Error C2371 'std::_Get_difference_type<_Ty,void>::type': redefinition; different basic types ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 384
Error C3646 'allocate': unknown override specifier ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 688
Error C2065 '_Al': undeclared identifier ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 688
Error C2275 '_Alloc': illegal use of this type as an expression ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 688
Error C2226 syntax error: unexpected type 'std::allocator_traits<_Alloc>::size_type' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 688
Error C2334 unexpected token(s) preceding '{'; skipping apparent function body ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 689
Error C3646 'allocate': unknown override specifier ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 693
Error C2065 '_Al': undeclared identifier ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 693
Error C2275 '_Alloc': illegal use of this type as an expression ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 693
Error C2226 syntax error: unexpected type 'std::allocator_traits<_Alloc>::size_type' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 693
Error C2334 unexpected token(s) preceding '{'; skipping apparent function body ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 695
Error C2061 syntax error: identifier 'pointer' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 700
Error C2039 'pointer': is not a member of 'std::allocator_traits<_Alloc>' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 990
Error C3646 'pointer': unknown override specifier ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 990
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 990
Error C2027 use of undefined type 'std::_Replace_first_parameter<_Other,_Ty>' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 469
Error C3646 'type': unknown override specifier ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 469
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 469
Error C2027 use of undefined type 'std::_Replace_first_parameter<_Other,_Ty>' ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\xmemory0 469
Error C2535 'std::list<key,value>::list(unsigned int,const int &)': member function already defined or declared ali c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.24728\include\list 923
What am I doing wrong?

Second template argument to std::list should be an allocator, yet you gave it something else - your value, which is int.
As a result, compiler is complaining because int doesn't have any members which allocator should expose.
On a side note, you should make your include files self-sufficient, i.e. they should include all headers they need themselves.

Related

Errors when compiling code from Practical Programming 2nd with Custom header

I'm starting with the first example from PPP2nd and immediately I have encountered significant issue with the custom header. I have put the header in the compiler include directory for ease of access. Both VS 2010 and 2012 will not compile. Your help would be greatly appreciated.
#include <std_lib_facilities.h>
int main()
{
cout << "Hello,world\n";
return 0;
}
Error 1 error C2868: 'std::vector<_Ty,_Alloc>::size_type' : illegal syntax for using-declaration; expected qualified-name c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 71 1 HelloWorld
Error 2 error C2143: syntax error : missing ';' before '=' c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 71 1 HelloWorld
Error 3 error C2238: unexpected token(s) preceding ';' c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 71 1 HelloWorld
Error 4 error C2061: syntax error : identifier 'initializer_list' c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 80 1 HelloWorld
Error 5 error C2535: 'Vector<T>::Vector(void)' : member function already defined or declared c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 80 1 HelloWorld
Error 6 error C2868: 'std::basic_string<_Elem,_Traits,_Alloc>::size_type' : illegal syntax for using-declaration; expected qualified-name c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 102 1 HelloWorld
Error 7 error C2143: syntax error : missing ';' before '=' c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 102 1 HelloWorld
Error 8 error C2238: unexpected token(s) preceding ';' c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 102 1 HelloWorld
Error 9 error C2143: syntax error : missing ';' before '{' c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 213 1 HelloWorld
Error 10 error C2275: 'std::uniform_int_distribution<>' : illegal use of this type as an expression c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 213 1 HelloWorld
Error 11 error C2143: syntax error : missing ';' before '}' c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 213 1 HelloWorld
Error 12 error C2988: unrecognizable template declaration/definition c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 222 1 HelloWorld
Error 13 error C2059: syntax error : 'using' c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 222 1 HelloWorld
Error 14 error C2143: syntax error : missing ';' before '<' c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 243 1 HelloWorld
Error 15 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 243 1 HelloWorld
Error 16 error C2988: unrecognizable template declaration/definition c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 243 1 HelloWorld
Error 17 error C2059: syntax error : '<' c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 243 1 HelloWorld
Error 18 error C2143: syntax error : missing ';' before '{' c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 251 1 HelloWorld
Error 19 error C2447: '{' : missing function header (old-style formal list?) c:\program files (x86)\microsoft visual studio 11.0\vc\include\std_lib_facilities.h 251 1 HelloWorld
20 IntelliSense: type name is not allowed c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\std_lib_facilities.h 213 81 HelloWorld
21 IntelliSense: expected a ';' c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\std_lib_facilities.h 213 107 HelloWorld
Upgrading to visual studio 2015 allowed me to compile the source file with the customer header file "std_lib_facilities.h" provided by the author.
Thanks all for the guidance and feedback.

extern class object not working :S

moving a global class object into its corresponding cpp file so i can declare it as an extern in order to use it in multiple files to avoid re-declaration compile errors.
Models.h
#ifndef MODELS_H
#define MODELS_H
#include <xnamath.h>
class Models {
public:
ID3D11Buffer* meshVertBuff;
ID3D11Buffer* meshIndexBuff;
std::vector<int> meshSubsetIndexStart;
std::vector<int> meshSubsetTexture;
int meshSubsets;
XMMATRIX Player;
};
#endif
Models.cpp
#include "Models.h"
Models Model_1;
Models Model_2;
Main.cpp
#include "Input.h"
#include "Models.h"
#include "Player.h"
#include "Camera.h"
extern Camera MainCamera;
extern My_Player mainPlayer;
extern Models Model_1;
extern Models Model_2;
oddly it's not working and i can't see why as i just get a ton of XNAMATH errors when i moved the class objects to model.cpp, if they're in model.h it's fine but then i cant use it in other modules. :S any help is appreciated.
errors -
Error 173 error C1003: error count exceeds 100; stopping compilation C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 429
Error 103 error C2040: '_XMMATRIX::operator ()' : 'int &(UINT,UINT)' differs in levels of indirection from 'int (UINT,UINT)' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 361
Error 28 error C2059: syntax error : ')' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 159
Error 37 error C2059: syntax error : ')' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 160
Error 57 error C2059: syntax error : ')' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 324
Error 110 error C2059: syntax error : ')' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 363
Error 114 error C2059: syntax error : ')' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 366
Error 118 error C2059: syntax error : ')' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 367
Error 119 error C2059: syntax error : '}' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 372
Error 121 error C2059: syntax error : '}' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 372
Error 104 error C2059: syntax error : 'return' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 361
Error 89 error C2061: syntax error : identifier 'CONST' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 358
Error 137 error C2061: syntax error : identifier 'CONST' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 398
Error 139 error C2061: syntax error : identifier 'CONST' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 400
Error 147 error C2061: syntax error : identifier 'CONST' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 412
Error 149 error C2061: syntax error : identifier 'CONST' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 414
Error 162 error C2061: syntax error : identifier 'CONST' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 430
Error 166 error C2061: syntax error : identifier 'CONST' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 432
Error 168 error C2061: syntax error : identifier 'CONST' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 434
Error 49 error C2061: syntax error : identifier 'FLOAT' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 316
Error 51 error C2061: syntax error : identifier 'FLOAT' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 317
Error 53 error C2061: syntax error : identifier 'FLOAT' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 323
Error 58 error C2061: syntax error : identifier 'FLOAT' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 325
Error 87 error C2061: syntax error : identifier 'FLOAT' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 354
Error 135 error C2061: syntax error : identifier 'FLOAT' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 397
Error 145 error C2061: syntax error : identifier 'FLOAT' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 411
Error 164 error C2061: syntax error : identifier 'FLOAT' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 431
Error 160 error C2061: syntax error : identifier 'HALF' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 429
Error 141 error C2065: '_x' : undeclared identifier C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 397
Error 151 error C2065: '_x' : undeclared identifier C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 411
Error 170 error C2065: '_x' : undeclared identifier C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 429
Error 142 error C2065: '_y' : undeclared identifier C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 397
Error 152 error C2065: '_y' : undeclared identifier C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 411
Error 171 error C2065: '_y' : undeclared identifier C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 429
Error 107 error C2065: 'CONST' : undeclared identifier C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 363
Error 111 error C2065: 'CONST' : undeclared identifier C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 366
Error 115 error C2065: 'CONST' : undeclared identifier C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 367
Error 153 error C2065: 'pArray' : undeclared identifier C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 412
Error 34 error C2086: 'int FLOAT' : redefinition C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 160
Error 97 error C2143: syntax error : missing ';' before '&' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 361
Error 106 error C2143: syntax error : missing ';' before '&' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 363
Error 123 error C2143: syntax error : missing ';' before '&' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 378
Error 91 error C2143: syntax error : missing ';' before '(' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 360
Error 29 error C2143: syntax error : missing ';' before '{' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 159
Error 38 error C2143: syntax error : missing ';' before '{' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 160
Error 120 error C2143: syntax error : missing ';' before '}' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 372
Error 108 error C2146: syntax error : missing ')' before identifier '_XMMATRIX' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 363
Error 112 error C2146: syntax error : missing ')' before identifier '_XMMATRIX' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 366
Error 116 error C2146: syntax error : missing ')' before identifier '_XMMATRIX' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 367
Error 26 error C2146: syntax error : missing ')' before identifier 'fDegrees' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 159
Error 35 error C2146: syntax error : missing ')' before identifier 'fRadians' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 160
Error 54 error C2146: syntax error : missing ')' before identifier 'S' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 324
Error 40 error C2146: syntax error : missing ';' before identifier '__vector4i' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 217
Error 60 error C2146: syntax error : missing ';' before identifier '_11' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 342
Error 66 error C2146: syntax error : missing ';' before identifier '_21' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 343
Error 72 error C2146: syntax error : missing ';' before identifier '_31' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 344
Error 78 error C2146: syntax error : missing ';' before identifier '_41' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 345
Error 126 error C2146: syntax error : missing ';' before identifier 'HALF' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 386
Error 43 error C2146: syntax error : missing ';' before identifier 'i' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 246
Error 84 error C2146: syntax error : missing ';' before identifier 'm' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 347
Error 46 error C2146: syntax error : missing ';' before identifier 'u' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 260
Error 129 error C2146: syntax error : missing ';' before identifier 'x' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 391
Error 154 error C2146: syntax error : missing ';' before identifier 'x' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 423
Error 31 error C2146: syntax error : missing ';' before identifier 'XMConvertToDegrees' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 160
Error 23 error C2146: syntax error : missing ';' before identifier 'XMConvertToRadians' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 159
Error 132 error C2146: syntax error : missing ';' before identifier 'y' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 392
Error 157 error C2146: syntax error : missing ';' before identifier 'y' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 424
Error 105 error C2238: unexpected token(s) preceding ';' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 361
Error 55 error C2365: 'operator *' : redefinition; previous definition was 'function' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 324
Error 117 error C2365: 'operator *' : redefinition; previous definition was 'function' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 367
Error 113 error C2365: 'operator *=' : redefinition; previous definition was 'function' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 366
Error 24 error C2433: 'FLOAT' : '__forceinline' not permitted on data declarations C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 159
Error 32 error C2433: 'FLOAT' : '__forceinline' not permitted on data declarations C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 160
Error 56 error C2440: 'initializing' : cannot convert from 'int' to 'XMVECTOR' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 324
Error 30 error C2447: '{' : missing function header (old-style formal list?) C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 159
Error 39 error C2447: '{' : missing function header (old-style formal list?) C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 160
Error 125 error C2530: 'CXMMATRIX' : references must be initialized C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 378
Error 136 error C2535: '_XMFLOAT2::_XMFLOAT2(void)' : member function already defined or declared C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 397
Error 138 error C2535: '_XMFLOAT2::_XMFLOAT2(void)' : member function already defined or declared C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 398
Error 161 error C2535: '_XMHALF2::_XMHALF2(void)' : member function already defined or declared C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 429
Error 163 error C2535: '_XMHALF2::_XMHALF2(void)' : member function already defined or declared C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 430
Error 165 error C2535: '_XMHALF2::_XMHALF2(void)' : member function already defined or declared C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 431
Error 167 error C2535: '_XMHALF2::_XMHALF2(void)' : member function already defined or declared C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 432
Error 88 error C2535: '_XMMATRIX::_XMMATRIX(void)' : member function already defined or declared C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 354
Error 90 error C2535: '_XMMATRIX::_XMMATRIX(void)' : member function already defined or declared C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 358
Error 146 error C2535: 'XMFLOAT2A::XMFLOAT2A(void)' : member function already defined or declared C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 411
Error 148 error C2535: 'XMFLOAT2A::XMFLOAT2A(void)' : member function already defined or declared C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 412
Error 102 error C2556: 'int &_XMMATRIX::operator ()(UINT,UINT)' : overloaded function differs only by return type from 'int _XMMATRIX::operator ()(UINT,UINT)' C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 361
Error 144 error C2614: '_XMFLOAT2' : illegal member initialization: 'x' is not a base or member C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 397
Error 143 error C2614: '_XMFLOAT2' : illegal member initialization: 'y' is not a base or member C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 397
Error 172 error C2614: '_XMHALF2' : illegal member initialization: 'y' is not a base or member C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 429
Error 95 error C2719: 'Column': formal parameter with __declspec(align('16')) won't be aligned C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 360
Error 100 error C2719: 'Column': formal parameter with __declspec(align('16')) won't be aligned C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 361
Error 94 error C2719: 'Row': formal parameter with __declspec(align('16')) won't be aligned C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 360
Error 99 error C2719: 'Row': formal parameter with __declspec(align('16')) won't be aligned C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 361
Error 50 error C2805: binary 'operator *=' has too few parameters C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 316
Error 59 error C2805: binary 'operator /' has too few parameters C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 325
Error 52 error C2805: binary 'operator /=' has too few parameters C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 317
Error 140 error C2805: binary 'operator =' has too few parameters C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 400
Error 150 error C2805: binary 'operator =' has too few parameters C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 414
Error 169 error C2805: binary 'operator =' has too few parameters C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 434
Error 93 error C3646: 'CONST' : unknown override specifier C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 360
Error 25 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 159
Error 27 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 159
Error 33 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 160
Error 36 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 160
Error 41 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 217
Error 42 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 217
Error 44 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 246
Error 45 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 246
Error 47 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 260
Error 48 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 260
Error 61 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 342
Error 62 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 342
Error 63 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 342
Error 64 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 342
Error 65 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 342
Error 67 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 343
Error 68 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 343
Error 69 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 343
Error 70 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 343
Error 71 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 343
Error 73 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 344
Error 74 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 344
Error 75 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 344
Error 76 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 344
Error 77 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 344
Error 79 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 345
Error 80 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 345
Error 81 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 345
Error 82 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 345
Error 83 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 345
Error 85 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 347
Error 86 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 347
Error 92 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 360
Error 96 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 360
Error 98 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 361
Error 101 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 361
Error 109 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 363
Error 122 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 378
Error 124 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 378
Error 127 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 386
Error 128 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 386
Error 130 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 391
Error 131 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 391
Error 133 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 392
Error 134 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 392
Error 155 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 423
Error 156 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 423
Error 158 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 424
Error 159 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xnamath.h 424
178 IntelliSense: expected a ')' d:\d3d11normalmap\d3d11normalmap\randomvariables.h 40
179 IntelliSense: expected a declaration d:\d3d11normalmap\d3d11normalmap\randomvariables.h 40
177 IntelliSense: expected an identifier d:\d3d11normalmap\d3d11normalmap\randomvariables.h 40
176 IntelliSense: no suitable constructor exists to convert from "XMVECTOR (FLOAT x, FLOAT y, FLOAT z, FLOAT w)" to "__m128" d:\d3d11normalmap\d3d11normalmap\randomvariables.h 40
174 IntelliSense: the #endif for this directive is missing d:\d3d11normalmap\d3d11normalmap\randomvariables.h 3
175 IntelliSense: this declaration has no storage class or type specifier d:\d3d11normalmap\d3d11normalmap\randomvariables.h 34

Errors in Xutility after defining _SCL_SECURE_NO_WARNINGS

I am trying to implement a class for calculating the dot product of two vectors.
float dotProduct(vec2 v1, vec2 v2)
{
if (v1.Length() != v2.Length()) { return NULL; }
return (float)std::inner_product(v1.x, v1.y, v2.x, 0.0);
}
When I complie this i get:
Error 1 error C4996: 'std::_Inner_product2': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\numeric 121
So i add #define _SCL_SECURE_NO_WARNINGS
But then I get a bunch of errors in xutility
Error 1 error C2825: '_Iter': must be a class or namespace when followed by '::' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 371
Error 2 error C2039: 'iterator_category' : is not a member of '`global namespace'' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 371
Error 3 error C2146: syntax error : missing ';' before identifier 'iterator_category' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 371
Error 4 error C2602: 'std::iterator_traits<_InIt>::iterator_category' is not a member of a base class of 'std::iterator_traits<_InIt>' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 371
Error 5 error C2868: 'std::iterator_traits<_InIt>::iterator_category' : illegal syntax for using-declaration; expected qualified-name C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 371
Error 6 error C2825: '_Iter': must be a class or namespace when followed by '::' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 372
Error 7 error C2039: 'value_type' : is not a member of '`global namespace'' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 372
Error 8 error C2146: syntax error : missing ';' before identifier 'value_type' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 372
Error 9 error C2602: 'std::iterator_traits<_InIt>::value_type' is not a member of a base class of 'std::iterator_traits<_InIt>' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 372
Error 10 error C2868: 'std::iterator_traits<_InIt>::value_type' : illegal syntax for using-declaration; expected qualified-name C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 372
Error 11 error C2825: '_Iter': must be a class or namespace when followed by '::' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 373
Error 12 error C2039: 'difference_type' : is not a member of '`global namespace'' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 373
Error 13 error C2146: syntax error : missing ';' before identifier 'difference_type' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 373
Error 14 error C2602: 'std::iterator_traits<_InIt>::difference_type' is not a member of a base class of 'std::iterator_traits<_InIt>' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 373
Error 15 error C2868: 'std::iterator_traits<_InIt>::difference_type' : illegal syntax for using-declaration; expected qualified-name C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 373
Error 16 error C2825: '_Iter': must be a class or namespace when followed by '::' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 375
Error 17 error C2039: 'pointer' : is not a member of '`global namespace'' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 375
Error 18 error C2146: syntax error : missing ';' before identifier 'pointer' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 375
Error 19 error C2602: 'std::iterator_traits<_InIt>::pointer' is not a member of a base class of 'std::iterator_traits<_InIt>' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 375
Error 20 error C2868: 'std::iterator_traits<_InIt>::pointer' : illegal syntax for using-declaration; expected qualified-name C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 375
Error 21 error C2825: '_Iter': must be a class or namespace when followed by '::' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 376
Error 22 error C2039: 'reference' : is not a member of '`global namespace'' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 376
Error 23 error C2146: syntax error : missing ';' before identifier 'reference' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 376
Error 24 error C2602: 'std::iterator_traits<_InIt>::reference' is not a member of a base class of 'std::iterator_traits<_InIt>' C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 376
Error 25 error C2868: 'std::iterator_traits<_InIt>::reference' : illegal syntax for using-declaration; expected qualified-name C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 376
Error 26 error C2665: 'std::_Debug_range2' : none of the 2 overloads could convert all the argument types C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility 584
Check the documentation
http://en.cppreference.com/w/cpp/algorithm/inner_product
You are passing values not the iterators. this fuction can create product for longer vectors, so it requires start and end of the data, try this;
std::inner_product(v1.begin(), v1.end(), v2.begin(), 0.0);

Release configuration build, debug doesn't

I'm developing an AutoCad plugin (MFC dll), I'm using Visual Studio 2010 and C++.
Until now I was building the project with release configuration (both 32 and 64 bits), with no problems (I've test the plugin inside AutoCad).
But now that I want to debug a function with Visual Studio 2010 just changed the configuration to Debug and the build doesn't succeeded.
The output from build process:
------ Build started: Project: SAM, Configuration: Debug x64 ------
Build started 26/01/2012 11:36:32.
InitializeBuildStatus:
Touching "x64\Debug\SAM.unsuccessfulbuild".
ClCompile:
stdafx.cpp
Note: including file: c:\vs2010_workspace\s\sam\stdafx.h
Note: including file: c:\vs2010_workspace\s\sam\targetver.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\SDKDDKVer.h
Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\afxwin.h
Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\afx.h
Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\new.h
Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h
Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sal.h
Note: including file: c:\program files (x86)\microsoft visual studio 10.0\vc\include\codeanalysis\sourceannotations.h
c:\program files (x86)\microsoft visual studio 10.0\vc\include\codeanalysis\sourceannotations.h(27): error C2448: 'message' : function-style initializer appears to be a function definition
Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vadefs.h
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vadefs.h(121): error C2065: 'va_list' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vadefs.h(121): error C2059: syntax error : ','
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(486): error C2146: syntax error : missing ';' before identifier 'time_t'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): error C2061: syntax error : identifier 'uintptr_t'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(1961): error C2146: syntax error : missing ';' before identifier 'locinfo'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(1961): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(1961): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(1962): error C2146: syntax error : missing ';' before identifier 'mbcinfo'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(1962): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(1962): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(1980): error C2146: syntax error : missing ';' before identifier 'lc_id'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(1980): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(1980): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\new.h(52): error C2143: syntax error : missing ';' before '__cdecl'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\new.h(52): error C2065: 'new_handler' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\new.h(52): error C2146: syntax error : missing ')' before identifier '_NewHandler'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\new.h(52): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\new.h(52): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\new.h(52): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\new.h(58): error C2039: 'new_handler' : is not a member of 'std'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\new.h(58): error C2873: 'new_handler' : symbol cannot be used in a using-declaration
Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\afxver_.h
Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\afxv_w32.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winsdkver.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\windows.h
Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\excpt.h
Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h
Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdarg.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\windef.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winnt.h
Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h
Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(57): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(57): error C2143: syntax error : missing ';' before '*'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(57): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(59): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(59): error C2143: syntax error : missing ';' before '*'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(59): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(93): error C2061: syntax error : identifier '_locale_t'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(95): error C2061: syntax error : identifier '_locale_t'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2061: syntax error : identifier '_locale_t'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(99): error C2061: syntax error : identifier '_locale_t'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(101): error C2061: syntax error : identifier '_locale_t'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(103): error C2061: syntax error : identifier '_locale_t'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(105): error C2061: syntax error : identifier '_locale_t'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(107): error C2061: syntax error : identifier '_locale_t'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(109): error C2061: syntax error : identifier '_locale_t'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(111): error C2061: syntax error : identifier '_locale_t'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(113): error C2061: syntax error : identifier '_locale_t'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(115): error C2061: syntax error : identifier '_locale_t'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(119): error C2061: syntax error : identifier '_locale_t'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(121): error C2061: syntax error : identifier '_locale_t'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(135): error C2065: 'wint_t' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(135): error C2146: syntax error : missing ')' before identifier '_C'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(135): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(135): error C2491: 'iswalpha' : definition of dllimport data not allowed
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(135): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(136): error C2065: 'wint_t' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(136): error C2146: syntax error : missing ')' before identifier '_C'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(136): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(136): error C2491: '_iswalpha_l' : definition of dllimport data not allowed
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(136): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(137): error C2065: 'wint_t' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(137): error C2146: syntax error : missing ')' before identifier '_C'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(137): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(137): error C2491: 'iswupper' : definition of dllimport data not allowed
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(137): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(138): error C2065: 'wint_t' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(138): error C2146: syntax error : missing ')' before identifier '_C'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(138): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(138): error C2491: '_iswupper_l' : definition of dllimport data not allowed
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(138): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(139): error C2065: 'wint_t' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(139): error C2146: syntax error : missing ')' before identifier '_C'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(139): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(139): error C2491: 'iswlower' : definition of dllimport data not allowed
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(139): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(140): error C2065: 'wint_t' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(140): error C2146: syntax error : missing ')' before identifier '_C'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(140): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(140): error C2491: '_iswlower_l' : definition of dllimport data not allowed
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(140): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(141): error C2065: 'wint_t' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(141): error C2146: syntax error : missing ')' before identifier '_C'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(141): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(141): error C2491: 'iswdigit' : definition of dllimport data not allowed
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(141): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(142): error C2065: 'wint_t' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(142): error C2146: syntax error : missing ')' before identifier '_C'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(142): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(142): error C2491: '_iswdigit_l' : definition of dllimport data not allowed
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(142): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(143): error C2065: 'wint_t' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(143): error C2146: syntax error : missing ')' before identifier '_C'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(143): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(143): error C2491: 'iswxdigit' : definition of dllimport data not allowed
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(143): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(144): error C2065: 'wint_t' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(144): error C2146: syntax error : missing ')' before identifier '_C'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(144): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(144): error C2491: '_iswxdigit_l' : definition of dllimport data not allowed
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(144): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(145): error C2065: 'wint_t' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(145): error C2146: syntax error : missing ')' before identifier '_C'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(145): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(145): error C2491: 'iswspace' : definition of dllimport data not allowed
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(145): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(146): error C2065: 'wint_t' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(146): error C2146: syntax error : missing ')' before identifier '_C'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(146): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(146): error C2491: '_iswspace_l' : definition of dllimport data not allowed
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(146): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(147): error C2065: 'wint_t' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(147): error C2146: syntax error : missing ')' before identifier '_C'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(147): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(147): error C2491: 'iswpunct' : definition of dllimport data not allowed
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(147): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(148): error C2065: 'wint_t' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(148): error C2146: syntax error : missing ')' before identifier '_C'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(148): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(148): error C2491: '_iswpunct_l' : definition of dllimport data not allowed
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(148): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(149): error C2065: 'wint_t' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(149): error C2146: syntax error : missing ')' before identifier '_C'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(149): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(149): error C2491: 'iswalnum' : definition of dllimport data not allowed
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(149): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(150): error C2065: 'wint_t' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(150): error C2146: syntax error : missing ')' before identifier '_C'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(150): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(150): error C2491: '_iswalnum_l' : definition of dllimport data not allowed
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(150): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(151): error C2065: 'wint_t' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(151): error C2146: syntax error : missing ')' before identifier '_C'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(151): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(151): error C2491: 'iswprint' : definition of dllimport data not allowed
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(151): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(152): error C2065: 'wint_t' : undeclared identifier
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(152): error C2146: syntax error : missing ')' before identifier '_C'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(152): warning C4229: anachronism used : modifiers on data are ignored
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(152): error C2491: '_iswprint_l' : definition of dllimport data not allowed
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(152): fatal error C1003: error count exceeds 100; stopping compilation
Build FAILED.
PS.: I'm not an expert developing whit c++ (I came from Java), I've started just a week ago.
EDIT:
I've commented the piece of code below, and i was able to build. The code was on stdafx.h, and I have no clue of what it mean, someone could explain it to me?
#if defined(_DEBUG) && !defined(_FULLDEBUG_)
#define _DEBUG_WAS_DEFINED
#undef _DEBUG
#pragma
message (" Compiling MFC header files in release mode.")
#endif
You should check your project properties for Debug and for Release configuration and see if you are missing something. I would start with Linker -> Input -> Additional Dependencies and C/C++ -> General -> Additional Include Directories.
I know this answer is a year late, but #pragma and message should be on the same line. Someone probably hit the enter key accidentally. This is why it works in release mode but not debug; _DEBUG is not defined in release configuration.
Visual Studio 2010 has a habit of giving you some weird error messages that should otherwise be straightforward parsing problems.

Replacing native VS 2010 (VC10) tr1 libraries with Boost.TR1

I have been using VS 2005 (VC8) with Boost.TR1 in the std::tr1 namespace by setting the Include Directories of VS to prioritize the boost tr1 headers as described here.
Now I am moving over to VS 2010 (VC10) and I seem to be getting compilation errors using the same include method.
The Include Directories are set to:
[boost-root]\boost\tr1\tr1
[boost-root]
VC standard include directories
Sample code:
#include <functional>
#include <iostream>
int main(int argc, char ** argv)
{
std::cout << std::tr1::bind(std::minus<int>(), 5, std::tr1::placeholders::_1)(5)
<< std::endl;
return 0;
}
Build output:
1>------ Rebuild All started: Project: test_tr1, Configuration: Release Win32 ------
1>Build started 17/8/2010 1:01:58 PM.
1>_PrepareForClean:
1> Deleting file "Release\test_tr1.lastbuildstate".
1>InitializeBuildStatus:
1> Creating "Release\test_tr1.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>ClCompile:
1> main.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(26): error C2143: syntax error : missing ';' before '<'
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(27) : see reference to class template instantiation 'std::tr1::_Unrefwrap<_Type>' being compiled
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(26): 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\../include/utility(26): error C2238: unexpected token(s) preceding ';'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(84): error C2039: '_Remove_reference' : is not a member of 'std::tr1'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(84): error C2143: syntax error : missing ';' before '<'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(84): error C2433: '_Remove_reference' : 'inline' not permitted on data declarations
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(84): 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\../include/utility(84): error C2988: unrecognizable template declaration/definition
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(84): error C2059: syntax error : '<'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(84): error C2039: '_Type' : is not a member of '`global namespace''
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(92): error C2039: '_Remove_reference' : is not a member of 'std::tr1'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(92): error C2039: '_Type' : is not a member of '`global namespace''
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(94): error C2143: syntax error : missing ';' before '{'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(94): error C2447: '{' : missing function header (old-style formal list?)
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(139): error C2143: syntax error : missing ';' before '<'
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(168) : see reference to class template instantiation 'std::_Pair_base<_Ty1,_Ty2>' being compiled
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(139): 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\../include/utility(139): error C2238: unexpected token(s) preceding ';'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(140): error C2059: syntax error : '<'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(140): error C2238: unexpected token(s) preceding ';'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(142): error C2061: syntax error : identifier '_Ty1x'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(142): error C2535: 'std::_Pair_base<_Ty1,_Ty2>::_Pair_base(void)' : member function already defined or declared
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(124) : see declaration of 'std::_Pair_base<_Ty1,_Ty2>::_Pair_base'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(148): 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\../include/utility(148): error C2143: syntax error : missing ',' before '&'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(153): error C2061: syntax error : identifier '_Ty1x'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(153): error C2535: 'std::_Pair_base<_Ty1,_Ty2>::_Pair_base(void)' : member function already defined or declared
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(124) : see declaration of 'std::_Pair_base<_Ty1,_Ty2>::_Pair_base'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(221): error C2059: syntax error : '<'
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(273) : see reference to class template instantiation 'std::pair<_Ty1,_Ty2>' being compiled
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(221): error C2238: unexpected token(s) preceding ';'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(222): error C2059: syntax error : '<'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(222): error C2238: unexpected token(s) preceding ';'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(224): error C2061: syntax error : identifier '_Ty1x'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(224): error C2535: 'std::pair<_Ty1,_Ty2>::pair(void)' : member function already defined or declared
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(181) : see declaration of 'std::pair<_Ty1,_Ty2>::pair'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(230): 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\../include/utility(230): error C2143: syntax error : missing ',' before '&'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(236): error C2061: syntax error : identifier '_Ty1x'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(236): error C2535: 'std::pair<_Ty1,_Ty2>::pair(void)' : member function already defined or declared
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/utility(181) : see declaration of 'std::pair<_Ty1,_Ty2>::pair'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility(282): error C2143: syntax error : missing ',' before '<'
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility(284) : see reference to class template instantiation 'std::_Is_checked_helper<_Iter>' being compiled
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility(500): error C2143: syntax error : missing ';' before '<'
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility(504) : see reference to class template instantiation 'std::_Ptr_cat_helper<_Elem,_Elem>' being compiled
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility(500): 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\xutility(503): error C2238: unexpected token(s) preceding ';'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(345): error C2143: syntax error : missing ';' before '<'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(345): error C2433: 'enable_if' : 'inline' not permitted on data declarations
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(345): 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\xxbind1(345): error C2988: unrecognizable template declaration/definition
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(345): error C2059: syntax error : '<'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(345): error C2039: 'value' : is not a member of '`global namespace''
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(346): error C2065: '_Ret' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(347): error C2065: '_Rx' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(348): error C2143: syntax error : missing ')' before '__cdecl'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(348): error C3861: '_Rx': identifier not found
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(349): error C2039: 'type' : is not a member of '`global namespace''
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(360): error C2065: '_Rx' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(361): error C2065: '_Rx' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(362): error C2143: syntax error : missing ')' before '__cdecl'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(362): error C3861: '_Rx': identifier not found
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(364): error C2143: syntax error : missing ';' before '{'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(365): error C2143: syntax error : missing ')' before '__cdecl'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(365): error C3861: '_Rx': identifier not found
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(366): error C2065: '_Callable' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(367): error C2065: '_Rx' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(367): error C2065: '_Rx' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(367): error C2065: '_MyBind' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(368): error C2143: syntax error : missing ';' before '}'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(374): error C2947: expecting '>' to terminate template-argument-list, found '>'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(375): error C2039: 'value' : is not a member of '`global namespace''
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(375): error C2065: 'value' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(375): error C2275: 'std::tr1::_Rx' : illegal use of this type as an expression
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(374) : see declaration of 'std::tr1::_Rx'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(376): error C2065: '_Ret' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(379): error C2947: expecting '>' to terminate template-argument-list, found '>'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(379): error C2974: 'std::tr1::_Callable_fun' : invalid template argument for '_Ty', type expected
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xrefwrap(185) : see declaration of 'std::tr1::_Callable_fun'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(379): error C2975: 'std::tr1::_Callable_fun' : invalid template argument for '_Indirect', expected compile-time constant expression
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xrefwrap(185) : see declaration of 'std::tr1::_Callable_fun'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(380): error C2039: 'type' : is not a member of 'std::tr1::_Callable_fun'
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xrefwrap(185) : see declaration of 'std::tr1::_Callable_fun'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(380): error C2065: 'type' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(380): error C2146: syntax error : missing ',' before identifier 'bind'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(380): error C2143: syntax error : missing ')' before '__stdcall'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(380): error C2514: 'std::tr1::_Rx' : class has no constructors
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(374) : see declaration of 'std::tr1::_Rx'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(381): error C2143: syntax error : missing ';' before '{'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(383): error C2065: '_Callable' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(384): error C2065: '_Ret' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(384): error C2065: '_MyBind' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(385): error C2143: syntax error : missing ';' before '}'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(394): error C2143: syntax error : missing ';' before '{'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(396): error C2065: '_Callable' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(397): error C2065: '_MyBind' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(398): error C2143: syntax error : missing ';' before '}'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(404): error C2947: expecting '>' to terminate template-argument-list, found '>'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(405): error C2146: syntax error : missing ',' before identifier 'enable_if'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(405): error C2065: 'is_same' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(405): error C2065: '_Ret' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(405): error C2039: 'value' : is not a member of 'std::tr1::_Bind'
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/functional(380) : see declaration of 'std::tr1::_Bind'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(406): error C2065: '_Ret' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(409): error C2955: 'std::tr1::_Bind' : use of class template requires template argument list
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/functional(380) : see declaration of 'std::tr1::_Bind'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(410): error C2039: 'type' : is not a member of '`global namespace''
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(410): error C2065: 'type' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(410): error C2146: syntax error : missing ',' before identifier 'bind'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(410): error C2143: syntax error : missing ')' before '__fastcall'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(410): error C2514: 'std::tr1::_Rx' : class has no constructors
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(374) : see declaration of 'std::tr1::_Rx'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(410): error C2059: syntax error : ')'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(411): error C2143: syntax error : missing ';' before '{'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(413): error C2065: '_Callable' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(414): error C2065: '_Ret' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(414): error C2065: '_MyBind' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(415): error C2143: syntax error : missing ';' before '}'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(424): error C2143: syntax error : missing ';' before '{'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(426): error C2065: '_Callable' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(427): error C2065: '_MyBind' : undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(428): error C2143: syntax error : missing ';' before '}'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(240): error C2906: 'std::tr1::_Binder<false,1>' : explicit specialization requires 'template <>'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(257): error C2947: expecting '>' to terminate template-argument-list, found '>'
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxbind1(257): fatal error C1003: error count exceeds 100; stopping compilation
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.48
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
It seems like it is using VC10's tr1 headers instead of boost. What is the correct method to get VS to use Boost.TR1 as a replacement?
Try defining _HAS_CPP0X=0 in the project's set of defines - that's supposed to disable VC10's TR1 support.
Microsoft advises against using _HAS_CPP0X=0 with VS2010. What you can do is:
Use Microsoft's tr1 implementation (not recommended, it's buggy)
Use the boost tr1 features directly from the boost namespace using full qualifiers (e.g. boost::function(..), boost::bind(...), etc.). You get name clashes otherwise.
Use using-declarations