VATE FAQ Q: 使用 GNU Autotools, 在做 make 時出現以下的錯誤訊息, 怎麼辦 ? *** Warning: linker path does not have real file for library -lws2_32." *** I have the capability to make that library automatically link in when" *** you link to this library. But I can only do this if you have a" *** shared version of the library, which you do not appear to have" *** because I did check the linker path looking for a file starting" A: 上面的訊息表示 libtool 找不到 libws2_32.dll 這個 DLL (for winsock). 這個問題通常 是當你自己寫 configure.in 時 (如果改寫 vate-examples >= 0.13.0 的 configure.in 一般 不會出現上面的錯誤訊息). 當你使用 libtool 做 link 的動作時, libtool 會檢查所有被使用的的 libraries 是否有對 應的 DLL 存在, 如果找不到的話 libtool 會拒絕產生 DLL. 這個 default 的行為會 1) 讓你 compile/link 的時間增長 (特別是 vate >= 0.12.x, 使用了 GUI 的 libraries) 2) libtool (up to 2.2.6b) 並不會搜尋不是命名為 libxxx.dll 的 DLL (bug ?), 造成雖然 c:\WINDOWS\system32\ws2_32.dll 存在, 但 libtool 卻會誤判該 DLL 不存在. Solution 1: 使用 vate-examples >= 0.13.0 中的 configure.in 作為範本. 特別留意這段 codes: AC_ARG_ENABLE(pass-all, [ --enable-pass-all=[no/yes] turn off libraries check (default=no)],,enable_pass_all=yes) AC_MSG_CHECKING([pass all]) if test "x$enable_pass_all" = "xyes"; then lt_cv_deplibs_check_method=pass_all fi AC_MSG_RESULT($enable_pass_all) 注意, 這段 code 必須出現在 AC_PROG_LIBTOOL 之前. 這段程式會要求 libtool 不要做 libraries 的檢查 (所以 make 會跑的比較快). Solution 2: 在執行 configure 時, 指定 lt_cv_deplibs_check_method 為 pass_all 如下: lt_cv_deplibs_check_method=pass_all ./configrue 結果與 solution 1 相同, 但你無須改變原有的 configure.in script. Solution 3: copy C:\WINDOWS\system32\ws2_32.dll 到 C:\mingw\bin\libws2_32.dll. Libtool 雖然功能強大, 但並不是一個很好用的工具, 除了 ws2_32.dll 之外, 常見會有誤判情形的 libraries 如 -lz, -lgdi32 ... 等. 大致上都可以用類似的方法處理. 缺點是你必須自己確認該有的 DLL 都存在. 但做為一個 programmer 通常我們都知道自己使用了哪些 DLL, 而且如果真的有缺, 程式最後執行時也會知道 (runtime 時會有 error message 告訴你哪一個 DLL 找不到). 所以在 VATE 0.13.0 之後 examples default 都不會做 libraries check. Q: 如果你執行 vate, 但 vate hangup 沒有出現任何訊息 !! A: 試著執行 vatekey-info. 如果出現 seg. fault 或其他不正常的訊息, 很可能你的 evaluation license file 太舊, 與新的 VATE 不相容. 請重新申請 evaluation license. Q: client 測試程式, 例如執行簡單的 help 功能, vate_init_loop_reset_loop_cli.exe -?, 結果 於 DOS Prompt 下執行時什麼也沒有印出來. 但在 MSYS 下執行卻完全正常 !! A: 執行到的程式應該是 libtool 的 wrapper script 而非真正的 exe 檔.