CXXSources——它们是什么?
我是在 make 的帮助下编译 C/C++ 的新手。我下载了一个开源项目,注意到make文件中有CXXSources和CXXObjects。我想我大致了解 make 文件对它们的作用,但是......
我没有 CXXSources 下列出的任何源文件。这些是我应该知道如何找到的依赖关系吗?对于 CXXSource 与 Source 有何不同,有什么习惯吗?
添加了项目链接:http:// www.fim.uni-passau.de/en/fim/faculty/chairs/theoretische-informatik/projects.html
更具体地说,GML 解析器,例如。 http://www .fim.uni-passau.de/fileadmin/files/lehrstuhl/brandenburg/projekte/gml/gml-parser.tar.gz
似乎越来越卡在线路上:
gml_to_graph : $(CXXOBJECTS) gml_scanner.o gml_parser.o $(CXX) -o gml_to_graph_demo $(CXXOBJECTS) gml_parser.o gml_scanner.o -L$(LEDADIR)/lib -lG -lL -lm
定义
$CXXObjects 由CXXSOURCES = gml_to_graph.cc gml_to_graph_demo.cc CXXOBJECTS = $(CXXSOURCES:.cc=.o)
所以看来我需要 gml_to_graph.cc 。或者也许我错了?
I'm new to compiling C/C++ with the aid of make. I downloaded an open source project and noticed that there is in the make file CXXSources and CXXObjects. I think I understand roughly what the make file is doing with them but...
I don't have any of the source files listed under CXXSources. Are these like dependences I'm supposed to know how to find? Is there any custom as to what CXXSource is versus just Source?
Added link to project: http://www.fim.uni-passau.de/en/fim/faculty/chairs/theoretische-informatik/projects.html
More specifically, the GML parser, eg. http://www.fim.uni-passau.de/fileadmin/files/lehrstuhl/brandenburg/projekte/gml/gml-parser.tar.gz
It seems to be getting stuck on the line:
gml_to_graph : $(CXXOBJECTS) gml_scanner.o gml_parser.o
$(CXX) -o gml_to_graph_demo $(CXXOBJECTS) gml_parser.o gml_scanner.o -L$(LEDADIR)/lib -lG -lL -lm
The $CXXObjects is defined by
CXXSOURCES = gml_to_graph.cc gml_to_graph_demo.cc
CXXOBJECTS = $(CXXSOURCES:.cc=.o)
So I need gml_to_graph.cc, it seems. Or maybe I'm wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常,变量是在您看到它们之前设置的。这可能是
(a)通过环境
(b) 在包含引用的 makefile 之前
(c) 在引用的 makefile 中,但在引用的位置之前 要
(详细地)查看 GNU make 考虑的内容,请执行:
make -Bn
(它将显示 _ 将执行的所有内容)
更详细:
make -p all
它将向您展示所有内部变量扩展。
如果您发布链接或更多信息,我们将能够提供不那么通用(因此可能不那么令人困惑)的答案
Usually, the variables are set before the point where you see them. This could be
(a) via the environment
(b) before including the quoted makefile
(c) in the quoted makefile, but preceding the location quoted
To see (verbosely) what GNU make takes into account, do:
make -Bn
(it will show everything that _would get executed)
Even more verbose:
make -p all
It will show you all the internal variable expansions.
If you post a link or more information, we will be able to come up with less generic (and hence possibly less confusing) answers