PHP 拡張機能内で使用する静的ライブラリを作成しようとしています。.cそのために、ファイルを使用gcc -c file.c -o file.oおよび取得してファイルをコンパイルしてい.oます。次にar rcs lib.a *.o、コンパイルされたすべてのオブジェクトを.aファイルにアーカイブするために使用します。
これを行った後、PHP 拡張機能をコンパイルするときにこの.aファイルを参照していますが、次のエラーが発生します。
*** Warning: Linking the shared library <extension>.la against the
*** static library lib.a is not portable!
.oファイルの代わりにファイルを使用すると、次の.aようになります。
*** Warning: Linking the shared library <extension>.la against the non-libtool
*** objects file1.o file2.o is not portable!
私は何を間違っていますか?これを行う正しい方法は何ですか?