title: fatal error C1083: Cannot open include file: 'boost/variant.hpp': No such file or directory
body: <p>I'm working on a project due in 2 days, and for the past 2 days, I've just been searching for a way to get this to work. I'm fairly new to C++, and our Class project requires us using C++ to make 5 games, and have them export to a MySQL database for a high scores table.</p>
  
  <p>The MySQL database is no problem at all. My only problem is getting C++ to connect to the MySQL database.</p>
  
  <p>So here's some more info incase someone can help me.</p>
  
  <p>I'm using Visual Studio 2010 and 2012 for this. (As in I have VS 2012, while my school has 2010, so I don't know if there is any compatability differences for this, but I also have VS2010).</p>
  
  <p>I've been searching the web for 5 hours or more about these kind of things, like why my "#include " statement won't work, and I've learned about going into the project properties and adding different include libraries. Usually after surfing for a while, I can figure out where I went wrong, but here I've just hit a dead end, as the only help I can find with this says to include boost, which I have done, but I'm completely stumped to this point. My Friends I'm doing this class project with are getting impatient, as this is the last thing we have left to do.</p>
  
  <p>So here's the things I think I should include.</p>
  
  <p>My Includes for both test programs I am doing (both are the exact same)</p>
  
  <pre><code>"Additional Include Directories"
  C:\Users\Damian\Desktop\boost_1_53_0\boost_1_53_0\boost
  C:\Program Files\MySQL\MySQL Connector C++ 1.1.3\include
  C:\Program Files\MySQL\MySQL Server 5.6\include
  </code></pre>
  
  <p>My Linker->"Additional Library Directories"</p>
  
  <pre><code>C:\Users\Damian\Desktop\boost_1_53_0\boost_1_53_0\boost
  C:\Program Files\MySQL\MySQL Connector C++ 1.1.3\lib\opt
  C:\Program Files\MySQL\MySQL Server 5.6\lib
  </code></pre>
  
  <p>My code for both programs I am trying to run.</p>
  
  <p>This one is the one I was testing on Visual Studio 2012</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cstdio&gt;
  #include &lt;cstdlib&gt;
  using namespace std;
  
  #include &lt;stdlib.h&gt;
  #include &lt;Windows.h&gt;
  #include &lt;mysql.h&gt;
  #include "mysql_connection.h"
  
  #include &lt;cppconn/driver.h&gt;
  #define host "localhost"
  #define username "username"
  #define password "password"
  #define database "db_test"
  
  int main()
  {
      MYSQL* conn;
      conn = mysql_init( NULL );
      if( conn )
      {
          mysql_real_connect( conn, host, username, password, database, 0, NULL, 0 );
      }
      MYSQL_RES* res_set;
      MYSQL_ROW row;
      unsigned int i;
      mysql_query( conn, "SELECT * FROM tbl_clients WHERE id = 1" ); 
      res_set = mysql_store_result( conn );
      unsigned int numrows = mysql_num_rows( res_set ); 
      if( numrows )
      {
          row = mysql_fetch_row( res_set );
          if( row != NULL )
          {
              cout &lt;&lt; "Client ID  : " &lt;&lt; row[0] &lt;&lt; endl;
              cout &lt;&lt; "Client Name: " &lt;&lt; row[1] &lt;&lt; endl;
          }
      }
      if( res_set )
      {
          mysql_free_result( res_set );
      }
      if( conn )
      {
          mysql_close( conn );
      }
  
      return 0;
  }
  </code></pre>
  
  <p>This is the Code I'm trying to compile on Visual Studio 2010</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #define W32_LEAN_AND_MEAN
  #include &lt;winsock2.h&gt;
  #include "mysql.h"
  #include "mysql_connection.h"
  
  #include &lt;cppconn/driver.h&gt;
  #include &lt;iostream&gt;
  
  // change these to suit your setup
  #define TABLE_OF_INTEREST "highscores"
  #define SERVER_NAME "127.0.0.1"
  #define DB_USER "root"
  #define DB_USERPASS "root"
  #define DB_NAME "test"
  
  // prototypes
  void showTables(MYSQL*);
  void showContents(MYSQL*,const char*);
  
  using namespace std;
  
  int main(int argc, char* argv[])
  {
  MYSQL *hnd=NULL; // mysql connection handle
  const char *sinf=NULL; // mysql server information
  
  hnd = mysql_init(NULL);
  if (NULL == mysql_real_connect(hnd,SERVER_NAME,DB_USER,DB_USERPASS,DB_NAME,0,NULL,0))
  {
  fprintf(stderr,"Problem encountered connecting to the %s database on %s.\n",DB_NAME,SERVER_NAME);
  }
  else
  {
  fprintf(stdout,"Connected to the %s database on %s as user '%s'.\n",DB_NAME,SERVER_NAME,DB_USER);
  sinf = mysql_get_server_info(hnd);
  
  if (sinf != NULL)
  {
  fprintf(stdout,"Got server information: '%s'\n",sinf);
  showTables(hnd);
  showContents(hnd,TABLE_OF_INTEREST);
  }
  else
  {
  fprintf(stderr,"Failed to retrieve the server information string.\n");
  }
  
  mysql_close(hnd);
  }
  
  return 0;
  }
  
  void showTables(MYSQL *handle)
  {
  MYSQL_RES *result=NULL; // result of asking the database for a listing of its tables
  MYSQL_ROW row; // one row from the result set
  
  result = mysql_list_tables(handle,NULL);
  row = mysql_fetch_row(result);
  fprintf(stdout,"Tables found:\n\n");
  while (row)
  {
  fprintf(stdout,"\t%s\n",row[0]);
  row = mysql_fetch_row(result);
  }
  mysql_free_result(result);
  
  fprintf(stdout,"\nEnd of tables\n");
  
  return;
  }
  
  void showContents
  (
  MYSQL *handle,
  const char *tbl
  )
  {
  MYSQL_RES *res=NULL; // result of querying for all rows in table
  MYSQL_ROW row; // one row returned
  char sql[1024], // sql statement used to get all rows
  commastr[2]; // to put commas in the output
  int i,numf=0; // number of fields returned from the query
  
  sprintf(sql,"select * from %s",tbl);
  fprintf(stdout,"Using sql statement: '%s' to extract all rows from the specified table.\n",sql);
  
  if (!mysql_query(handle,sql))
  {
  res = mysql_use_result(handle);
  if (res)
  {
  numf = mysql_num_fields(res);
  row = mysql_fetch_row(res);
  fprintf(stdout,"Rows returned:\n\n");
  while (row)
  {
  commastr[0]=commastr[1]=(char)NULL;
  for (i=0;i&lt;numf;i++)
  {
  if (row == NULL)
  {
  fprintf(stdout,"%sNULL",commastr);
  }
  else
  {
  fprintf(stdout,"%s%s",commastr,row);
  }
  commastr[0]=',';
  }
  fprintf(stdout,"\n");
  
  row = mysql_fetch_row(res);
  }
  fprintf(stdout,"\nEnd of rows\n");
  
  mysql_free_result(res);
  }
  else
  {
  fprintf(stderr,"Failed to use the result acquired!\n");
  }
  }
  else
  {
  fprintf(stderr,"Failed to execute query. Ensure table is valid!\n");
  }
  
  return;
  } 
  </code></pre>
  
  <p>Now both of these give me this error</p>
  
  <pre><code>1&gt;c:\program files\mysql\mysql connector c++ 1.1.3\include\cppconn\connection.h(31): fatal error C1083: Cannot open include file: 'boost/variant.hpp': No such file or directory
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>
  
  <p>Please help! Note: I'm only trying to connect to the database with success so I can run different queries and whatnot. These programs are just tests that I've copied from elsewhere.</p>
  
  <p>Thanks!!</p>