Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/155.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 将htmlcxx与开发人员cpp一起使用时出现链接错误_C++_Linker Errors - Fatal编程技术网

C++ 将htmlcxx与开发人员cpp一起使用时出现链接错误

C++ 将htmlcxx与开发人员cpp一起使用时出现链接错误,c++,linker-errors,C++,Linker Errors,我有一个使用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] undefine

我有一个使用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)
如果您发布生成文件,可能会更容易解决问题…生成文件是由IDE自动生成的CPP=g++.exe CC=gcc.exe WINDRES=WINDRES.exe OBJ=tree\u test.o$RES LINKOBJ=tree\u test.o$RES LIBS=-LC:/Dev CPP/lib-lwinmm-lgdi32 INCS=-IC:/Dev CPP/include cxincs=-IC:/Dev Cpp/lib/gcc/mingw32/3.4.2/include-IC:/Dev Cpp/include/c++/3.4.2/backward-IC:/Dev Cpp/include/c++/3.4.2/mingw32-IC:/Dev Cpp/include/c++/3.4.2-IC:/Dev Cpp/include BIN=test.exe cxflags=$CXXINCS CFLAGS=$INCS RM=RM-f$BIN:$OBJ$sac$LINKOBJ$o test.exe$lib实际上我下载的htmlcxx文件已经全部下载完毕对于include路径,我想我需要构建相同的路径来创建.lib或.a文件,但我想知道如何做到这一点。我从下载了htmlcxx,我只想把它留在这里:。因为我不知道OP会读它:一个可怕的、过时的IDE,使用了一个可怕的过时版本的GCC编译器。Dev-C++上一次更新是在2005年,当时它有缺陷,并且缺少主要功能。这种情况并没有因为代码已经6年没有修改而得到改善。默认情况下,它与GCC 3.4捆绑在一起,GCC 3.4也同样旧。**不要使用**;