Qt4.7.3を最新のBotanv1.10.1ライブラリで動作させるようにしています。
Windows用のBotanバイナリがありますが、*。dllファイルはMSVisualStudio専用のようです。そこで、Botanをmingw32でコンパイルして、Qt互換の*.dllファイルと*.aファイルを取得できるようにしました。
いくつかの追加情報:
-Windows764ビット。
-32ビットモードでコンパイルしようとしました。
-Qtはすべて最新のものであり、32ビットモードでインストールされており、うまく機能します。
-Botanはx86Windows用のv1.10.1です。
Qtコマンドプロンプトを開き、次のコマンドを発行しました。
configure.py --cc=gcc --cpu=x86
このコマンドはMakefileを生成しました。
次に、このコマンドを使用しました。
mingw32-make
このコマンドは、数分間実行した後、次のエラーを生成します。
C:\ Botan-1.10.1 \ src \ utils \ time.cpp:関数内'tm Botan :::: do_gmtime(time_t)':C:\ Botan-1.10.1 \ src \ utils \ time.cpp:55 :エラー:'gmtime_s'はこのスコープで宣言されていませんmingw32-make:* [build \ lib\time.obj]エラー1
C:\ Botan-1.10.1 \ src \ utils \ time.cppを開いて、これを変更しました
#if defined(BOTAN_TARGET_OS_HAS_GMTIME_S)
gmtime_s(&tm, &time_val); // Windows
#elif defined(BOTAN_TARGET_OS_HAS_GMTIME_R)
gmtime_r(&time_val, &tm); // Unix/SUSv2
#else
std::tm* tm_p = std::gmtime(&time_val);
if (tm_p == 0)
throw Encoding_Error("time_t_to_tm could not convert");
tm = *tm_p;
#endif
これに
/*#if defined(BOTAN_TARGET_OS_HAS_GMTIME_S)
gmtime_s(&tm, &time_val); // Windows
#elif defined(BOTAN_TARGET_OS_HAS_GMTIME_R)
gmtime_r(&time_val, &tm); // Unix/SUSv2
#else*/
std::tm* tm_p = std::gmtime(&time_val);
if (tm_p == 0)
throw Encoding_Error("time_t_to_tm could not convert");
tm = *tm_p;
//#endif
次に、mingw32-makeを再度実行しました。今回はさらにコンパイルし、このエラーでスタックしました。
C:\ Botan-1.10.1> mingw32-make process_begin:CreateProcess(NULL、rm -f libbotan-1.10.a、...)が失敗しました。make(e = 2):システムは指定されたファイルを見つけることができません。mingw32-make:* [libbotan-1.10.a]エラー2
このエラーを乗り越えることはできません。どんな助けでも大歓迎です。