0
我有一個PHP
擴展名的文件我一直在維護一段時間,它在一個目錄中包含所有內容。然後,我有些感動的文件到一個新目錄wb/
,並適當補充來源,但是在編譯擴展引發此錯誤:無法在PHP上編譯共享的擴展名
Creating library Release_TS\php5ts.lib and object Release_TS\php5ts.exp
wb_winsys.obj : error LNK2019: unresolved external symbol _wbError referenced in
function _wbInit
wb_bitmap.obj : error LNK2001: unresolved external symbol _wbError
wb_control.obj : error LNK2001: unresolved external symbol _wbError
wb_control_toolbar.obj : error LNK2001: unresolved external symbol _wbError
wb_generic.obj : error LNK2001: unresolved external symbol _wbError
wb_winsys.obj : error LNK2019: unresolved external symbol _wbMalloc referenced i
n function _wbInit
wb_control_toolbar.obj : error LNK2001: unresolved external symbol _wbMalloc
wb_font.obj : error LNK2001: unresolved external symbol _wbMalloc
wb_generic.obj : error LNK2001: unresolved external symbol _wbMalloc
wb_window.obj : error LNK2001: unresolved external symbol _wbMalloc
wb_bitmap.obj : error LNK2001: unresolved external symbol _wbMalloc
wb_control.obj : error LNK2001: unresolved external symbol _wbMalloc
wb_control_calendar.obj : error LNK2001: unresolved external symbol _wbMalloc
wb_control_menu.obj : error LNK2001: unresolved external symbol _wbMalloc
wb_window.obj : error LNK2019: unresolved external symbol _wbFree referenced in
function _wbSetTimer
wb_winsys.obj : error LNK2001: unresolved external symbol _wbFree
wb_bitmap.obj : error LNK2001: unresolved external symbol _wbFree
wb_control.obj : error LNK2001: unresolved external symbol _wbFree
wb_font.obj : error LNK2001: unresolved external symbol _wbFree
wb_generic.obj : error LNK2001: unresolved external symbol _wbFree
wb_bitmap.obj : error LNK2019: unresolved external symbol _WideChar2Utf8 referen
ced in function _ReadBitmap
wb_winsys.obj : error LNK2001: unresolved external symbol _WideChar2Utf8
wb_control.obj : error LNK2019: unresolved external symbol _wbCallUserFunction r
eferenced in function _wbRefreshControl
wb_window.obj : error LNK2001: unresolved external symbol _wbCallUserFunction
Release_TS\php5ts.dll : fatal error LNK1120: 5 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
\VC\BIN\cl.exe"' : return code '0x2'
Stop.
C:\Users\Administrator\Desktop\phc-win>
這使我相信,它沒有被正確鏈接。
的配置是這樣的:
// $Id$
// vim:ft=javascript
ARG_WITH("winbinder", "Include windows GUI support", "no");
if (PHP_WINBINDER == "yes") {
CHECK_HEADER_ADD_INCLUDE("wb/wb.h", "CFLAGS_INTL")
EXTENSION("winbinder", "phpwb_bitmap.c phpwb_control.c phpwb_control_listview.c\
phpwb_control_menu.c phpwb_control_toolbar.c phpwb_control_treeview.c\
phpwb_draw.c phpwb_export.c phpwb_font.c phpwb_generic.c phpwb_lowlevel.c\
phpwb_sysdlg.c phpwb_wb_lib.c phpwb_window.c phpwb_winsys.c", "-Iext\\wibinder\\wb");
ADD_SOURCES("ext\\winbinder\\wb", "wb_bitmap.c wb_control.c\
wb_control_calendar.c wb_control_html.c wb_control_hyperlink.c\
wb_control_listview.c wb_control_menu.c wb_control_tab.c wb_control_toolbar.c\
wb_control_treeview.c wb_draw.c wb_font.c wb_generic.c wb_lowlevel.c\
wb_sysdlg.c wb_window.c wb_winsys.c")
AC_DEFINE('HAVE_WINBINDER', 1, 'Include windows GUI support', false);
}
的代碼可以在https://github.com/stefan-loewe/WinBinder可以發現,如果它需要的,但這應該只是我的一個配置的問題。任何幫助將不勝感激!
你仍然需要定義連接標誌,例如'-lwb'。 –
嗨,@Jack,將此作爲答案提交,我將其標記爲已接受。謝謝! (這不是純粹的,但它導致我的鏈接器問題(只是Windows格式)) –