设置宏时,您需要使用从 Affectiva 收到的 SDK 许可文件的内容。当您检查许可证文件的内容时,您会看到如下 JSON 字符串:
{"token": "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "licensor": "Affectiva Inc.", "expires": "2019-04-15", "developerId": "dev@mycompany.com", "software": "Affdex SDK"}
相应地设置宏:
#define YOUR_AFFDEX_LICENSE_STRING_GOES_HERE {\"token\": \"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\", \"licensor\": \"Affectiva Inc.\", \"expires\": \"2019-04-15\", \"developerId\": \"dev@mycompany.com\", \"software\": \"Affdex SDK\"}
请注意,使用反斜杠字符转义每个双引号字符很重要,这样 C 预处理器就不会混淆。