1.下载Htmlcxx,官方网址:http://sourceforge.net/projects/htmlcxx
2.解压htmlcxx
3.打开htmlcxx.vcproj,htmlcxxapp.vcproj
4.设定依赖关系。使用VS打开htmlcxx.vcproj,可能需要对项目进行转换
5.选择编译模式:Debug或Release模式,具体由需要使用到Htmlcxx库文件的项目的编译模式决定。
6.右击htmlcxx,选择属性,可以看到运行库默认的是”多线程调试/MTD“:
7.部分编译器可能会报错:
bool detect_utf8(const char *begin, int size)
{
const char *ptr;
const char *end = begin+size;
const char *signature = "";
char previous_byte = 0;
unsigned count_bad_utf = 0;
unsigned count_good_utf = 0;
改成
bool detect_utf8(const char *begin, int size)
{
const char *ptr;
const char *end = begin+size;
const char *signature = NULL;
char previous_byte = 0;
unsigned count_bad_utf = 0;
unsigned count_good_utf = 0;
具体选择运行库时,需要使用到Htmlcxx库文件的项目的运行库决定。详细可参考
#visual studio# 运行库MT、MTd、MD、MDd
https://blog.csdn.net/xiaoting451292510/article/details/89385839
Windows库编译下载地址:https://gitee.com/arvinxt/window-library
附上htmlcxx学习资料:http://blog.csdn.net/youfangyuan/article/details/7816518