还是error LNK2019 问题,没解决
我写了一个DLL,里面有一个函数HRESULT DllPlay(wchar_t* wcsURL);
我在应用程序中使用这个DLL的函数,应用程序原来用非UNICODE编译时,Build Debug和Build Realease都没问题。但是我的应用程序改为UNICODE编译后,Build Debug正常,Build Realease会出现以下的错误:
error LNK2019: unresolved external symbol "__declspec(dllimport) long __cdecl DllPlay(unsigned short *)" (__imp_?DllPlay@@YAJPAG@Z) referenced in function "public: void __thiscall CDemoListDlg::OnBnClickedButtonPlay(void)" (?OnBnClickedButtonPlay@CDemoListDlg@@QAEXXZ)
应用程序中使用这个DLL的其他函数(参数是int或long或void)则没问题.如调用DllInitRadio正常.
应用程序中调用代码如下:
#pragma comment(lib, "NetRadioDll")
__declspec(dllimport) HRESULT DllInitRadio(HWND hDlg, RECT rcClient);
__declspec(dllimport) HRESULT DllPlay(wchar_t* wcsURL);
struct ProgramInfo{
long lnum;
wchar_t url[256];
};
BOOL CDemoListDlg::OnInitDialog()
{
.........
HRESULT hr = DllInitRadio(this->m_hWnd, rcClient);
}
void CDemoListDlg::OnBnClickedButtonPlay()
{
......
DllPlay(programInfo.url); //programInfo.url
}