2012-11-30 149 views
0

我使用C++错误,而编译应用程序

升压和MySQL连接器在我的应用程序

当我试图编译应用程序

我在配置得到这个错误

Error 4 error C2371: 'int8_t' : redefinition; different basic types 

。^h

#ifdef HAVE_STDINT_H 
#include <stdint.h> 
#endif 

#ifdef HAVE_INTTYPES_H 
#include <inttypes.h> 
#endif 

#if defined(_WIN32) 
#ifndef CPPCONN_DONT_TYPEDEF_MS_TYPES_TO_C99_TYPES 

#if !defined(HAVE_INT8_T) && defined(HAVE_MS_INT8) 
typedef __int8   int8_t; 
#endif 

我尝试,我发现当我在谷歌 搜索所有的解决方案,但没有successed

希望我在这里找到一个解决方案

谢谢

+1

何处以及如何被'HAVE_INT8_T'定义之前刚刚定义的呢?在我的'stdint.h',对于'int8_t'的typededf由'__int8_t_defined'守卫,你可以包括在你的支票。 –

回答

0

MSVC老版本没有<stdint.h>这样一种解决方法一些程序员做的事情以这种方式,但简单的解决方法可能在对项目的定义中添加HAVE_STDINT_H或包括头