Bug #61878 error: conflicting declaration 'typedef char int***_t'
Submitted: 15 Jul 2011 11:14 Modified: 24 Mar 2014 19:55
Reporter: Moritz Pflanzer Email Updates:
Status: Closed Impact on me:
Category:Connector / C++ Severity:S3 (Non-critical)
Version:1.1.0 OS:Windows (Vista)
Assigned to: Lawrenty Novitsky CPU Architecture:Any
Tags: conflicting declaration

[15 Jul 2011 11:14] Moritz Pflanzer
All typedef's in the cppconn/config.h do result in a warning like this:

"cppconn\config.h|60|error: conflicting declaration 'typedef char int8_t'|"
"\lib\gcc\mingw32\4.4.1\[...]\include\stdint.h|27|error: 'int8_t' has a previous declaration as 'typedef signed char int8_t'|"

I tried to compile it with boost_1_47_0.

How to repeat:
Just add these lines to your project file and make sure that the compiler can find the required boost files:

#include <cppconn/driver.h>
#include <cppconn/exception.h>
#include <cppconn/warning.h>
#include <cppconn/metadata.h>
#include <cppconn/prepared_statement.h>
#include <cppconn/resultset.h>
#include <cppconn/resultset_metadata.h>
#include <cppconn/statement.h>

#include "mysql_driver.h"
#include "mysql_connection.h"

Suggested fix:
If you comment all the typedef's in config.h out everything seems to be fine and for me it is still working.
[16 Jul 2011 14:46] Valeriy Kravchuk
What exact C++ compiler do you use to build?
[16 Jul 2011 15:03] Moritz Pflanzer
I'm using the Code::Blocks 10.05 with the included GCC compiler and GDB debugger from MinGW.

"gcc --version" displays "gcc (TDM-2 mingw32) 4.4.1"
[18 Aug 2011 17:11] Nir Amiri
1) I also have the same problem  using Win 7 64 bit and VC2010 with  boost 1_47_0

2) I tried to compile the example in: 

3) I also saw that other people reported the same problem:



4) at the moment I am using the solution offered in:

Please fix it.
[25 Nov 2012 19:41] Lawrenty Novitsky
The bug regarding VS10 had to be fixed in 1.1.1. Not sure about mingw gcc. We would appreciate if it was reiterated.
[25 Nov 2012 19:42] Lawrenty Novitsky
it=this bug
[24 Mar 2014 19:55] Lawrenty Novitsky
I have reasons to think it has been fixed. And no feedback from reporters
[12 May 2016 15:48] matt thomas
Still an issue for me with mingw. Going to try to comment it out, hopefully I dont need it.