IT翻訳 Nobuyuki の仕事部屋

ボランティアでソフトウエアーローカライズのために翻訳をしている。

XPCOM Component Reuseを草稿にする-05

2005-05-15 22:42:43 | InTranslated
本日も難しい内容ですが、継続します。(^_^;)

/*翻訳作業につきましては、本日の作業対象部分のみを以下に表示しておりますが、全体の原文と翻訳文(翻訳作業が完了している部分まで)は、直下のリンクをご参照ください。*/

原題: XPCOM Component Reuse
訳題: XPCOM コンポーネントの再使用

原文:  青色表示
訳文:  黒色表示
*n(=int)校正コメント:赤色表示

Putting it all together

If you are building an XPCOM component or embedding Gecko, linking to the glue static library and string library will reduce the dependancies which you may have on XPCOM. In this case be aware you will also have to link to NSPR.

When building, make sure that the build define XPCOM_GLUE is defined. This will ensures that the proper calling convention is used on the functions in the glue library. If you forget this step, you may have troubles linking.


すべてを統合する

XPCOM 部品を構築したり、Gecko を埋め込んでいるなら、glue スタティック・ライブラリやストリング・ライブラリへリンクすることは、XPCOM への依存関係を弱めることになります。この場合また、 NSPR(Netscape ポータブル・ランタイム)へのリンクが必要になることに注意してください。

作業時に、XPCOM_GLUE というビルド定義が、かならず定義されるようにしてください。こうすると、glue ライブラリの関数に、正しい呼出し規則がかならず使われることになります。この措置を忘れると、リンクに問題が発生します。

//→以下画像は省略:冒頭のリンクでご参照ください//

If you use this method, you should double-check all of the dll imports from your component or application. On Windows, for example, run: "dumpbin /imports ". This will produce a listing of all the code required to run your component or application. If you see that you require symbols from XPCOM, make sure that they are listed in nsXPCOM.h. If the function is not listed there, chances are you should not be using it.

この方法を使うなら、部品やアプリケーションからのすべてのインポートを二重チェックするべきです。例えば、Windows では、"dumpbin /imports <file>" を動作させてください。そうすれば、部品やアプリケーションを動作させるのに必要なコードすべての一覧が提示されます。XPCOM の記号が必要であることが分かるなら、nsXPCOM.h に記号がかならずリストアップされるようにしてください。もしその機能がそこにリストアップされなければ、多分それが使えないということです//草稿訳注:the function = symbols と解釈でいいか?//

Below is a snapshot of the xpcom includes from an embedding example. Clearly, this embedding example must ship its own copy of XPCOM to maintain compatibility.

埋め込み例から xpcom の include のスナップショットを以下に示します。この埋め込み例は、互換性を維持するのに xpcom の自分自身のコピーを送る必要があります。

途中ですが、以下次回にします。(-_-;(-_-;(-_-;(-_-;