我遵循了文档,并复制了示例代码,但我得到了错误:
http://michaelrsweet.github.io/mxml/
Error LNK2019 unresolved external symbol _mxmlDelete referenced in function _load_rate
Error LNK2019 unresolved external symbol _mxmlLoadFile referenced in function _load_rate
#include <stdio.h>
#include <stdlib.h>
#include <mxml.h>
#include "Rate.h"
void load_rate(rate *currentrate) {
FILE *fp;
mxml_node_t *tree;
fp = fopen("filename.xml", "r");
tree = mxmlLoadFile(NULL, fp, MXML_TEXT_CALLBACK);
fclose(fp);
mxmlDelete(tree);
}你知道我做错了什么吗?
发布于 2017-04-20 19:54:36
链接器找不到库文件。你能分享一下编译选项吗?您应该包含像-lmxml这样的内容
我确认库的名称是libmxml,所以您只需向链接器指定库的使用。
https://stackoverflow.com/questions/43518713
复制相似问题