title: A value of type "const wchar_t *" cannot be used to initialize an entity of type "LPCSTR"
body: <p>im learning C++ Direct X Programming. And im on the first tutorial of directx programming tutorial(I will post link on comments..). I just had trouble setting up Chilli DirectX Framework for some reason.. </p>
  
  <h2>Errors</h2>
  
  <pre><code>Error (active) argument of type "const wchar_t *" is incompatible with parameter of type "LPCSTR"   Chilli  c:\Users\**NAME**\Documents\DirectXFrameworks\Chili DirectX Framework\Assets\Windows.cpp    126 
  
  
  A value of type "const wchar_t *" cannot be used to initialize an entity of type "LPCSTR"   Chilli  c:\Users\**NAME**\Documents\DirectXFrameworks\Chili DirectX Framework\Assets\Windows.cpp    90  
  
  
  Error   C2440   'initializing': cannot convert from 'const wchar_t [31]' to 'LPCSTR'    Chilli  c:\users\**NAME**\documents\directxframeworks\chili directx framework\assets\windows.cpp    90  
  
  
  Error   C2664   'BOOL UnregisterClassA(LPCSTR,HINSTANCE)': cannot convert argument 1 from 'const wchar_t [31]' to 'LPCSTR'  Chilli  c:\users\**NAME**\documents\directxframeworks\chili directx framework\assets\windows.cpp    126 
  </code></pre>
  
  <p>I Guess its targeting line 90 and 126 from Window.cpp a lot so here is the full code of Window.cpp : </p>
  
  <h2>Error Lines</h2>
  
  <p>Line 90 Window.cpp:  </p>
  
  <pre><code>   WNDCLASSEX wc = { sizeof( WNDCLASSEX ),CS_CLASSDC,MsgProc,0,0,
                        GetModuleHandle( NULL ),NULL,NULL,NULL,NULL,
                          L"Chili DirectX Framework Window",NULL };
  </code></pre>
  
  <p>Line 125 Window.cpp:   <code>UnregisterClass(L"Chili DirectX Framework Window",wc.hInstance );</code></p>
  
  <h2>Error Pictures</h2>
  
  <p>Pictures representing the problem on visual studio : 
  Line 126 : <a href="http://i.imgur.com/LrHHr9o.png" rel="noreferrer">http://i.imgur.com/LrHHr9o.png</a></p>
  
  <p>Line 90 : <a href="http://i.imgur.com/5dXSvFS.png" rel="noreferrer">http://i.imgur.com/5dXSvFS.png</a></p>
  
  <h2>Full Code of Window.cpp Only</h2>
  
  <p>Full Code Window.cpp:</p>
  
  <pre><code>    /****************************************************************************************** 
   *  Chili DirectX Framework Version 11.12.17                                              * 
   *  Windows.cpp                                                                           *
   *  Copyright 2011 PlanetChili.net                                                        *
   *                                                                                        *
   *  This file is part of The Chili DirectX Framework.                                     *
   *                                                                                        *
   *  The Chili DirectX Framework is free software: you can redistribute it and/or modify   *
   *  it under the terms of the GNU General Public License as published by                  *
   *  the Free Software Foundation, either version 3 of the License, or                     *
   *  (at your option) any later version.                                                   *
   *                                                                                        *
   *  The Chili DirectX Framework is distributed in the hope that it will be useful,        *
   *  but WITHOUT ANY WARRANTY; without even the implied warranty of                        *
   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                         *
   *  GNU General Public License for more details.                                          *
   *                                                                                        *
   *  You should have received a copy of the GNU General Public License                     *
   *  along with The Chili DirectX Framework.  If not, see &lt;http://www.gnu.org/licenses/&gt;.  *
   ******************************************************************************************/
  #include &lt;Windows.h&gt;
  #include &lt;wchar.h&gt;
  #include "Game.h"
  #include "resource.h"
  
  static KeyboardServer kServ;
  
  LRESULT WINAPI MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
  {
      switch( msg )
      {
          case WM_DESTROY:
              PostQuitMessage( 0 );
              return 0;
          case WM_KEYDOWN:
              switch( wParam )
              {
              case VK_UP:
                  kServ.OnUpPressed();
                  break;
              case VK_DOWN:
                  kServ.OnDownPressed();
                  break;
              case VK_LEFT:
                  kServ.OnLeftPressed();
                  break;
              case VK_RIGHT:
                  kServ.OnRightPressed();
                  break;
              case VK_SPACE:
                  kServ.OnSpacePressed();
                  break;
              case VK_RETURN:
                  kServ.OnEnterPressed();
                  break;
              }
              break;
          case WM_KEYUP:
              switch( wParam )
              {
              case VK_UP:
                  kServ.OnUpReleased();
                  break;
              case VK_DOWN:
                  kServ.OnDownReleased();
                  break;
              case VK_LEFT:
                  kServ.OnLeftReleased();
                  break;
              case VK_RIGHT:
                  kServ.OnRightReleased();
                  break;
              case VK_SPACE:
                  kServ.OnSpaceReleased();
                  break;
              case VK_RETURN:
                  kServ.OnEnterReleased();
                  break;
              }
      }
  
      return DefWindowProc( hWnd, msg, wParam, lParam );
  }
  
  
  int WINAPI wWinMain( HINSTANCE hInst,HINSTANCE,LPWSTR,INT )
  {
      WNDCLASSEX wc = { sizeof( WNDCLASSEX ),CS_CLASSDC,MsgProc,0,0,
                        GetModuleHandle( NULL ),NULL,NULL,NULL,NULL,
                          L"Chili DirectX Framework Window",NULL };
  
      wc.hIconSm = (HICON)LoadImage( hInst,MAKEINTRESOURCE( IDI_APPICON16 ),IMAGE_ICON,16,16,0 );
      wc.hIcon   = (HICON)LoadImage( hInst,MAKEINTRESOURCE( IDI_APPICON32 ),IMAGE_ICON,32,32,0 );
      RegisterClassEx( &amp;wc );
  
      RECT wr;
      wr.left = 100;
      wr.right = 800 + wr.left;
      wr.top = 100;
      wr.bottom = 600 + wr.top;
      AdjustWindowRect( &amp;wr,WS_OVERLAPPEDWINDOW,FALSE );
      HWND hWnd = CreateWindowW( L"Chili DirectX Framework Window",L"Chili DirectX Framework",
                                WS_OVERLAPPEDWINDOW,wr.left,wr.top,wr.right-wr.left,wr.bottom-wr.top,
                                NULL,NULL,wc.hInstance,NULL );
  
      ShowWindow( hWnd,SW_SHOWDEFAULT );
      UpdateWindow( hWnd );
  
      Game theGame( hWnd,kServ );
  
      MSG msg;
      ZeroMemory( &amp;msg,sizeof( msg ) );
      while( msg.message != WM_QUIT )
      {
          if( PeekMessage( &amp;msg,NULL,0,0,PM_REMOVE ) )
          {
              TranslateMessage( &amp;msg );
              DispatchMessage( &amp;msg );
          }
          else
          {
              theGame.Go();
          }
      }
  
      UnregisterClass(L"Chili DirectX Framework Window",wc.hInstance );
      return 0;
  }
  </code></pre>
  
  <p>Errors after i enable Unicode:</p>
  
  <pre><code>Severity    Code    Description Project File    Line    Suppression State
  Error   LNK1120 13 unresolved externals Chilli  c:\users\NAME\documents\visual studio 2015\Projects\Chilli\Debug\Chilli.exe 1   
  Error   LNK2019 unresolved external symbol __imp__UpdateWindow@4 referenced in function _wWinMain@16    Chilli  c:\Users\NAME\documents\visual studio 2015\Projects\Chilli\Chilli\Windows.obj   1   
  Error   LNK2019 unresolved external symbol __imp__UnregisterClassW@8 referenced in function _wWinMain@16    Chilli  c:\Users\NAME\documents\visual studio 2015\Projects\Chilli\Chilli\Windows.obj   1   
  Error   LNK2019 unresolved external symbol __imp__TranslateMessage@4 referenced in function _wWinMain@16    Chilli  c:\Users\NAME\documents\visual studio 2015\Projects\Chilli\Chilli\Windows.obj   1   
  Error   LNK2019 unresolved external symbol __imp__ShowWindow@8 referenced in function _wWinMain@16  Chilli  c:\Users\NAME\documents\visual studio 2015\Projects\Chilli\Chilli\Windows.obj   1   
  Error   LNK2019 unresolved external symbol __imp__RegisterClassExW@4 referenced in function _wWinMain@16    Chilli  c:\Users\NAME\documents\visual studio 2015\Projects\Chilli\Chilli\Windows.obj   1   
  Error   LNK2019 unresolved external symbol __imp__PostQuitMessage@4 referenced in function "long __stdcall MsgProc(struct HWND__ *,unsigned int,unsigned int,long)" (?MsgProc@@YGJPAUHWND__@@IIJ@Z) Chilli  c:\Users\NAME\documents\visual studio 2015\Projects\Chilli\Chilli\Windows.obj   1   
  Error   LNK2019 unresolved external symbol __imp__PeekMessageW@20 referenced in function _wWinMain@16   Chilli  c:\Users\NAME\documents\visual studio 2015\Projects\Chilli\Chilli\Windows.obj   1   
  Error   LNK2019 unresolved external symbol __imp__LoadImageW@24 referenced in function _wWinMain@16 Chilli  c:\Users\NAME\documents\visual studio 2015\Projects\Chilli\Chilli\Windows.obj   1   
  Error   LNK2019 unresolved external symbol __imp__DispatchMessageW@4 referenced in function _wWinMain@16    Chilli  c:\Users\NAME\documents\visual studio 2015\Projects\Chilli\Chilli\Windows.obj   1   
  Error   LNK2019 unresolved external symbol __imp__DefWindowProcW@16 referenced in function "long __stdcall MsgProc(struct HWND__ *,unsigned int,unsigned int,long)" (?MsgProc@@YGJPAUHWND__@@IIJ@Z) Chilli  c:\Users\NAME\documents\visual studio 2015\Projects\Chilli\Chilli\Windows.obj   1   
  Error   LNK2019 unresolved external symbol __imp__CreateWindowExW@48 referenced in function _wWinMain@16    Chilli  c:\Users\NAME\documents\visual studio 2015\Projects\Chilli\Chilli\Windows.obj   1   
  Error   LNK2019 unresolved external symbol __imp__AdjustWindowRect@12 referenced in function _wWinMain@16   Chilli  c:\Users\NAME\documents\visual studio 2015\Projects\Chilli\Chilli\Windows.obj   1   
  Error   LNK2019 unresolved external symbol _Direct3DCreate9@4 referenced in function "public: __thiscall D3DGraphics::D3DGraphics(struct HWND__ *)" (??0D3DGraphics@@QAE@PAUHWND__@@@Z) Chilli  c:\Users\NAME\documents\visual studio 2015\Projects\Chilli\Chilli\D3DGraphics.obj   1   
  </code></pre>