'int8_t' : redefinition error in config.h when trying to connect mysql cpp connector to visual studio 2010

前端 未结 1 1389
隐瞒了意图╮
隐瞒了意图╮ 2020-12-22 04:39

This is the full error report that is generated when tried to compile my file using visual studio. The compiled file is a sample code that was found in the net. It used very

相关标签:
1条回答
  • 2020-12-22 05:41

    It looks like you should be able to work around this problem by setting the following macro definition in your project settings:

    HAVE_INT8_T=1
    

    or by /DHAVE_INT8_T=1 if you're using the command line.

    Actually, you should probably set the following macro definitions in the project instead:

    HAVE_STDINT_H=1
    CPPCONN_DONT_TYPEDEF_MS_TYPES_TO_C99_TYPES=1
    

    This should make the MySQL connector headers rely only on stdint.h for the C99 integer typenames instead of trying to define any of them on its own.

    0 讨论(0)
提交回复
热议问题