Install htmlccx. Windows

Hello. How i can install htmlccx module on WIndows?
I am tryed to use it by copying folder with module to folder with project, but i have errors
1
2
3
4
5
6
7
8
   1>main.obj : warning LNK4075: не учитывается "/EDITANDCONTINUE" из-за спецификации "/INCREMENTAL:NO"
1>main.obj : error LNK2019: ссылка на неразрешенный внешний символ "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl htmlcxx::HTML::operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class tree<class htmlcxx::HTML::Node,class std::allocator<class tree_node_<class htmlcxx::HTML::Node> > > const &)" (??6HTML@htmlcxx@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV23@ABV?$tree@VNode@HTML@htmlcxx@@V?$allocator@V?$tree_node_@VNode@HTML@htmlcxx@@@@@std@@@@@Z) в функции _main
1>main.obj : error LNK2019: ссылка на неразрешенный внешний символ "public: class tree<class htmlcxx::HTML::Node,class std::allocator<class tree_node_<class htmlcxx::HTML::Node> > > const & __thiscall htmlcxx::HTML::ParserDom::parseTree(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?parseTree@ParserDom@HTML@htmlcxx@@QAEABV?$tree@VNode@HTML@htmlcxx@@V?$allocator@V?$tree_node_@VNode@HTML@htmlcxx@@@@@std@@@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) в функции _main
1>main.obj : error LNK2001: неразрешенный внешний символ ""protected: virtual void __thiscall htmlcxx::HTML::ParserDom::beginParsing(void)" (?beginParsing@ParserDom@HTML@htmlcxx@@MAEXXZ)"
1>main.obj : error LNK2001: неразрешенный внешний символ ""protected: virtual void __thiscall htmlcxx::HTML::ParserDom::foundTag(class htmlcxx::HTML::Node,bool)" (?foundTag@ParserDom@HTML@htmlcxx@@MAEXVNode@23@_N@Z)"
1>main.obj : error LNK2001: неразрешенный внешний символ ""protected: virtual void __thiscall htmlcxx::HTML::ParserDom::foundText(class htmlcxx::HTML::Node)" (?foundText@ParserDom@HTML@htmlcxx@@MAEXVNode@23@@Z)"
1>main.obj : error LNK2001: неразрешенный внешний символ ""protected: virtual void __thiscall htmlcxx::HTML::ParserDom::foundComment(class htmlcxx::HTML::Node)" (?foundComment@ParserDom@HTML@htmlcxx@@MAEXVNode@23@@Z)"
1>main.obj : error LNK2001: неразрешенный внешний символ ""protected: virtual void __thiscall htmlcxx::HTML::ParserDom::endParsing(void)" (?endParsing@ParserDom@HTML@htmlcxx@@MAEXXZ)"
You have linker errors. It will be difficult to help without seeing code.
Edit: I am downloading the library, to see how it's formatted.
Did you read the INSTALL text file given in the zipped folder, and also the README? It seems to give directions in this file.

Which IDE are you using? Visual Studio, Code::Blocks, none, or something else? (I am not very familiar with how to set up linkage on VS)

If you just copied all the source into your project, you have to make sure all the header (.h) and implementation (.cpp) files are actually part of your project (Your library has a bunch, so it isn't recommended to copy-paste each file for every project you make...). Also, it might fail if you have something like #include <xxx> instead of #include "xxx" when your include paths are not specified.

It would probably be easier to set up the correct way instead of just copy-and-pasting all the files into your project. Sorry if this doesn't help much, but linker errors usually have to be solved by the user.
Last edited on
Some code
1
2
3
4
5
6
7
8
9
#include <iostream>
#include <fstream>
#include <string>
#include <curl/curl.h>
#include <htmlccx/html/ParserDom.h>
int main()
{
	HTML::ParserDom parser;
	string url = "**********";
	string source = go(url);
	tree<HTML::Node> dom = parser.parseTree(source);
	cout<<dom<<endl;
	return 0;
}

Function "go" made by using libcurl and returns html string.

I use Visual Studio 2010.

UPD: Instructions in INSTALL file for Linux. Or not?
Last edited on
Since these are linker errors, it would appear that you're not linking in the library file correctly.

LNK2001 and LNK2019 are both an undefined external symbol. This means you're trying to call that function from your code (main.obj), but the linker can not find the named function. The usual cause of this is that the library is not listed as an input to the linked in your project property pages.


Sorry, I am not familiar with VS that much, so I can't help much more, also you're right the INSTALL file seems to be for linux, my bad.

It is a problem with your include paths, it doesn't sound like you have them set up. If you don't, it won't recognize any custom #include <xyz> and you'd need to change all files to have #include "xyz" instead, this would be really tedious, and is most likely the wrong way of doing it.

This might help?
http://stackoverflow.com/questions/2676417/how-do-include-paths-work-in-visual-studio
Last edited on
Folder with module located in standart include directory. Anyway thank you.
ganado wrote:
It is a problem with your include paths

Since the OP's program is compiling, his include paths are okay.

The problem would seem to be that the library is not included in the list of inputs to the linker.
Library is not included because i dont have it in module folder. I think that i need to build module, but i cant find instructions how to do it.
Last edited on
Topic archived. No new replies allowed.