I have small program using htmlcxx but when I try building the code it gives linker error. I just downloaded the htmlcxx.084.zip, unzipped it and placed it in Dev-Cpp\include\c++\3.4.2\htmlcxx. The code d开发者_如何学Pythonoes not give any build error but the linking fails.
[Linker error] undefined reference to `htmlcxx::HTML::ParserDom::parseTree(std::string const&)'
[Linker error] undefined reference to `htmlcxx::HTML::operator<<(std::ostream&, tree<htmlcxx::HTML::Node, std::allocator<tree_node_<htmlcxx::HTML::Node> > > const&)'
[Linker error] undefined reference to `htmlcxx::HTML::Node::parseAttributes()'
[Linker error] undefined reference to `vtable for htmlcxx::HTML::ParserDom'
ld returned 1 exit status
[Build Error] [test.exe] Error 1
Am I missing something in the Makefile or the something is missing in the lib path.?
CPP = g++.exe CC = gcc.exe WINDRES = windres.exe OBJ = tree_test.o $(RES) LINKOBJ = tree_test.o $(RES) LIBS = -L"C:/Dev-Cpp/lib" -lwinmm -lgdi32 INCS = -I"C:/Dev-Cpp/include" CXXINCS = -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" BIN = test.exe CXXFLAGS = $(CXXINCS) CFLAGS = $(INCS) RM = rm -f $(BIN): $(OBJ) $(CPP) $(LINKOBJ) -o "test.exe" $(LIBS)
精彩评论