0

我在 Windows 7 64 位 PC 中编译 Visual Studio 2010 中 的decNumber C 库时遇到错误。

我已经尝试过这篇文章中提供的解决方案: decNumber library - compile issues但没有解决我的问题。

这些是我得到的错误

error C1189: #error :  Unexpected DECPMAX value

来自 delCommonn.c 文件中的这行代码:

//names for simpler testing and default context
   #if DECPMAX==7
  #define SINGLE     1
  #define DOUBLE     0
  #define QUAD       0
  #define DEFCONTEXT DEC_INIT_DECIMAL32
#elif DECPMAX==16
  #define SINGLE     0
  #define DOUBLE     1
  #define QUAD       0
  #define DEFCONTEXT DEC_INIT_DECIMAL64
#elif DECPMAX==34
  #define SINGLE     0
  #define DOUBLE     0
  #define QUAD       1
  #define DEFCONTEXT DEC_INIT_DECIMAL128
#else
  #error Unexpected DECPMAX value
#endif

也收到此错误:

error C1189: #error :  decBasic.c must be included after decCommon.c

从 delBasic.c 文件中的代码行:

// The compile-time flags SINGLE, DOUBLE, and QUAD are set up in
// decCommon.c
#if !defined(QUAD)
  #error decBasic.c must be included after decCommon.c
#endif
4

0 回答 0