I keep getting this annoying error whenever I include certain header files into the source file with the main function. Here's the compiler output...
1 2
1>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h(17): error C2371: 'int8_t' : redefinition; different basic types
1> c:\users\slartibartfast\documents\visual studio 2010\projects\mysql_connector_110\include\cppconn\config.h(60) : see declaration of 'int8_t'
I might not have been totally correct when I said that including "Database.h" was causing the error. I rebuilt the entire project and it turns out that "Socket.h" is the one to blame. The includes for all three header files in my project are posted below.
I can include both "Parser.h" and "Database.h" in the main source file without any problems, but if I include "Socket.h" and comment out the other two includes, I get the redefinition error.
I can't really help. It's an ugly situation.. stdint.h is included by string, iostream or boost/asio.h try finding which one it is. When you do, try looking at that file, see if there are any preprocessor conditions that could prevent including it of typedefing int8_t.
I've removed string and iostream from my header files since I didn't really need them. The conflict is between one of many header files inside boost/asio.h and cppconn/config.h.
I've googled around and saw that no one else seems to be having this problem. Other people have used mysql and boost in their projects without any collisions. I'm using VC++ with Visual Studio 2010, if that helps any. Perhaps there's something I forgot to configure?