1

libssl バージョン 0.9.7a に依存するサード パーティの静的ライブラリを C++ プロジェクトで使用しています。さまざまな理由により、私のプロジェクトで使用した libssl のバージョンは 0.9.8e です。

サードパーティが静的ライブラリに最近変更を加えるまで、すべてが正常に機能していました。この新しいバージョンの静的ライブラリが含まれていると、アプリケーションを正常にコンパイルできませんでした。古いバージョンは正常にコンパイルされます。

私は、これらのライブラリの依存関係とその下位互換性についてあまり詳しくありません。サードパーティから提案されたバージョンを使用する必要があると言われました。それが本当の理由かどうか知りたいだけです。IMO、下位互換性があるはずですよね?

この問題のトラブルシューティングに関する指示は非常に高く評価されています。

以下は、私が得ているコンパイルエラーです:

cc1plus: note: obsolete option -I- used, please use -iquote instead

In file included from /usr/include/openssl/e_os2.h:56,
                 from /usr/include/openssl/ssl.h:173,
                 from MyClass.cpp:28:

/usr/include/openssl/opensslconf.h:13:30: error: opensslconf-i386.h: No such file or directory
/usr/include/openssl/bn.h:288: error: expected ';' before '*' token
/usr/include/openssl/bn.h:304: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:407: error: 'BN_ULONG' was not declared in this scope
/usr/include/openssl/bn.h:450: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:451: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:452: error: 'BN_ULONG' has not been declared
/usr/include/openssl/bn.h:453: error: 'BN_ULONG' has not been declared
/usr/include/openssl/bn.h:454: error: 'BN_ULONG' has not been declared
/usr/include/openssl/bn.h:455: error: 'BN_ULONG' has not been declared
/usr/include/openssl/bn.h:456: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:471: error: 'BN_ULONG' has not been declared
/usr/include/openssl/bn.h:764: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:765: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:766: error: variable or field 'bn_sqr_words' declared void
/usr/include/openssl/bn.h:766: error: 'BN_ULONG' was not declared in this scope
/usr/include/openssl/bn.h:766: error: 'rp' was not declared in this scope
/usr/include/openssl/bn.h:766: error: expected primary-expression before 'const'
/usr/include/openssl/bn.h:766: error: expected primary-expression before 'int'
/usr/include/openssl/bn.h:767: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:768: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:769: error: 'BN_ULONG' does not name a type
/usr/include/openssl/ssl3.h:303: error: 'PQ_64BIT' does not name a type
/usr/include/openssl/pqueue.h:73: error: 'PQ_64BIT' does not name a type
/usr/include/openssl/pqueue.h:80: error: 'PQ_64BIT' was not declared in this scope
/usr/include/openssl/pqueue.h:80: error: expected primary-expression before 'void'
/usr/include/openssl/pqueue.h:89: error: 'PQ_64BIT' has not been declared
/usr/include/openssl/dtls1.h:92: error: 'PQ_64BIT' does not name a type
/usr/include/openssl/dtls1.h:94: error: 'PQ_64BIT' does not name a type

エラー メッセージには、opensslconf-i386.h のようなファイルがないことが示されていますが、実際には存在します。

何がうまくいかないのですか?

ありがとう!

4

1 に答える 1

3

C プリプロセッサが opensslconf-i386.h ファイルを見つけられないため、失敗する理由を突き止める必要があります。廃止されたオプションの使用に関するコンパイラからの警告が表示されました (修正が推奨されます) - 実行してください。

OK - あなたはファイルが存在すると言いました: それはどこにあり、それに対する権限は何ですか? opensslconf.h にはどのように含まれていますか? その行は、含まれている他の OpenSSL ヘッダーとどう違うのですか? 非推奨の「-I-」以外に使用している「-I」オプションは何ですか?

この段階では、インストールに問題があるか、コマンド ラインがおかしくなっていると思います。

そして、質問のタイトルは...明らかに質問の本文とは関係ありません。

  • 運用レベルでは、はい、ほとんどの目的でこの 2 つが相互に作用します。
  • コンパイル レベルでは、はい、この 2 つは基本的に互換性があります (0.9.7a で動作していたものは 0.9.8e でも動作するはずです)。
  • 内部および構成レベルでは、わずかな違いがあります。たとえば、より新しいバージョンでサポートされている追加の暗号またはモードがある場合があります。
于 2009-10-27T14:20:35.307 に答える