我有一个使用htmlcxx的小程序但是当我尝试构建代码时它会给链接器错误。 我刚下载了htmlcxx.084.zip,将其解压缩并放入Dev-Cpp \ include \ c ++ \ 3.4.2 \ htmlcxx。代码没有给出任何构建错误,但链接失败。
[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
我是否在Makefile中遗漏了某些内容,或者lib路径中缺少某些东西。?
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)