xsvrDlg.obj : error LNK2019: unresolved external symbol
_GetFileVersionInfoSizeW@8 referenced in function "public: int __thiscall CXsvrDlg::_UI_SetProductInfo(void)" (?_UI_SetProductInfo@CXsvrDlg@@QAEHXZ)
1>xsvrDlg.obj : error LNK2019: unresolved external symbol _GetFileVersionInfoW@16 referenced in function "public: int __thiscall CXsvrDlg::_UI_SetProductInfo(void)" (?_UI_SetProductInfo@CXsvrDlg@@QAEHXZ)
1>xsvrDlg.obj : error LNK2019: unresolved external symbol _GetFileVersionInfoW@16 referenced in function "public: int __thiscall CXsvrDlg::_UI_SetProductInfo(void)" (?_UI_SetProductInfo@CXsvrDlg@@QAEHXZ)
1>xsvrDlg.obj : error LNK2019: unresolved external symbol _VerQueryValueW@16 referenced in function "public: int __thiscall CXsvrDlg::_UI_SetProductInfo(void)" (?_UI_SetProductInfo@CXsvrDlg@@QAEHXZ)
msdn上说的是:https://msdn.microsoft.com/en-us/library/windows/desktop/ms647005(v=vs.85).aspx
实际上链接version.lib即可。
在项目设置中添加或者在代码中添加:
#pragma comment(lib, "version.lib")