Reputation: 54771
I have a C++ project that compiled fine under VS2008, but now I'm running VS2010 and not able to get back to 2008. That project isn't compiling anymore cause I get "error C2371: 'int8_t': redefinition; different basic types".
I've narrowed the problem down to using Boost 1.4x and MySQL C++ Connector. If I create a test.cpp file and put the following into it, then it generates the error.
// BOOST
#include <boost/filesystem.hpp>
// SQL connector
#include <mysql_connection.h>
#include <cppconn/resultset.h>
I've rebuild Boost 1.45, but still had the problem, then tried the latest 1.49 with the same result. There are no updates to the MySQL C++ Connector (v1.1)
I'm looking for possible recommendations or solutions to this problem.
Thanks,
Upvotes: 0
Views: 289
Reputation: 54771
Turns out there is a MySQL flag to disable the conflict. This seems to have resolved the issue for me.
// BOOST
#include <boost/filesystem.hpp>
#define HAVE_INT8_T 1
// SQL connector
#include <mysql_connection.h>
#include <cppconn/resultset.h>
Figures I find this moments after posting the question.
Upvotes: 2