阅读:5738回复:7
【求教】Mozilla编译顺序
我自己基于Mozilla的代码添加了一下接口,可是编译的时候总是找不到相应的头文件。我看了一下这些头文件主要是有IDL编译出来的,比如nsIDocshell.h。
我在netwerk/protocol/http/src/nsHttpChannel.cpp里#include "nsIDocshell.h"。 当编译到这个文件的时候,找不到nsIDocshell.h,我查了一下编出来的结果文件夹,docshell/base/nsIDocshell.h还没有出来呢? 不知道是编译的顺序需要调整还是哪里有错误? 谢谢! |
|
1楼#
发布于:2009-05-05 14:35
From https://developer.mozilla.org/en/How_mo ... stem_works,
I found that "At Mozilla, make is used to compile libraries and executables, create jar files for chrome, and copy files around. We use a 2-pass build system: * The export phase copies public header files to dist/include, and generates C++ header files from IDL files. * The libs phase compiles libraries, creates jar files, and creates typelib files from IDL files. Each of these phases is just a make target. That is, each directory is traversed once with the export target, and then again later with the libs target. The two-stage build exists because of circular dependencies among modules - exporting all of the headers at the start allows module A to include public headers from module B, and module B to include public headers from module A. " It seems I have dropped into the circular dependencies. Any ideas? |
|
2楼#
发布于:2009-05-05 14:35
|
|
3楼#
发布于:2009-05-05 14:35
我试过Mozilla3.0.8的源代码我是可以编译过的。
只是我加了上面提到的类似的#include就说找不到头文件了。 |
|
4楼#
发布于:2009-05-05 14:35
一般头文件只要指定路径
头文件有时会引用依赖包的头文件,需要手动指定。 |
|
5楼#
发布于:2009-05-05 14:35
|
|
6楼#
发布于:2009-05-05 14:35
|
|
7楼#
发布于:2009-05-05 14:35
Re: 一般头文件只要指定路径
你是说network里的Make.in中吧:我增加了docshell在REQUIRES。 REQUIRES = xpcom \ string \ pref \ nkcache \ mimetype \ intl \ unicharutil \ uconv \ docshell \ uriloader \ $(NULL) 不知道还需要添加什么指定么? |
|