【发布时间】:2020-10-07 09:40:02
【问题描述】:
我在 Linux 上使用 SimpleINI 库。有如下评论:
// Defines the conversion classes for different libraries. Before including
// SimpleIni.h, set the converter that you wish you use by defining one of the
// following symbols.
//
// SI_NO_CONVERSION Do not make the "W" wide character version of the
// library available. Only CSimpleIniA etc is defined.
// SI_CONVERT_GENERIC Use the Unicode reference conversion library in
// the accompanying files ConvertUTF.h/c
// SI_CONVERT_ICU Use the IBM ICU conversion library. Requires
// ICU headers on include path and icuuc.lib
// SI_CONVERT_WIN32 Use the Win32 API functions for conversion.
当我尝试编译以下代码时:
#define SI_NO_CONVERSION
#include "SimpleIni.h"
int main()
{
CSimpleIni ini;
return 0;
}
我收到编译错误:‘CSimpleIniA’ was not declared in this scope 看起来 SI_NO_CONVERSION 未在 SimpleIni.h 中定义。你能解释一下发生了什么吗?
【问题讨论】:
-
在 Windows 上构建也失败了。
-
网页上说是c++项目,不是c项目。您需要更改标签,删除 c 并添加 c++。
-
项目的 README.md 在代码方面已经过时了,但是如果您稍微编辑一下自述文件的示例,您就可以使用它。这不是一个维护良好的项目。