如何将VC的dll转为GCC中使用???
如何将下面的连接中的东东用在Dev-c++中???
http://www.vchelp.net/vchelp/file2004_3/skinload.asp?type_id=15&class_id=1&cata_id=1&article_id=997&search_term=
我已用pexports.exe 和 dlltool.exe 转换为 *.a文件,但编译后还是有以下错误。请高手指导。
[Linker error] undefined reference to `InitSkinLoad(unsigned long)
[Linker error] undefined reference to `LoadSkin(char *)
[Linker error] undefined reference to `ExitSkinLoad(void)
测试代码如下:
#include <windows.h>
#include "SkinLoadLib.h"
HINSTANCE m_hDllSkin;
BOOL APIENTRY MainDlgProc(HWND hDlg,UINT message,WPARAM wParam,LPARAM lParam)
{
POINT MousePoint;
HWND hWnd;
switch(message)
{
case WM_INITDIALOG:
SetWindowPos(hDlg,HWND_TOPMOST,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE);
InitSkinLoad(GetCurrentThreadId());
LoadSkin("xp_bule.skin");
if(m_hDllSkin != NULL)
{
typedef int (* INITSKIN)(DWORD dwThreadId);
typedef bool (* LOADSKIN)(char* cPath);
INITSKIN pInitSkin = (INITSKIN)GetProcAddress(m_hDllSkin,"InitSkinLoad");
LOADSKIN pLoadSkin = (LOADSKIN)GetProcAddress(m_hDllSkin,"LoadSkin");
if(pInitSkin != NULL && pLoadSkin != NULL)
{
(*pInitSkin)(GetCurrentThreadId());
(*pLoadSkin)("xp_bule.skin");
}
}
return(TRUE);
case WM_CLOSE:
EndDialog(hDlg,TRUE);
return(TRUE);
case WM_DESTROY:
{
if(m_hDllSkin != NULL)
{
typedef bool (* EXITSKIN)();
EXITSKIN pExitSkin = (EXITSKIN)GetProcAddress(m_hDllSkin,"ExitSkin");
if(pExitSkin != NULL)
{
(*pExitSkin)();
}
FreeLibrary(m_hDllSkin);
}
ExitSkinLoad();
return(true);
}
case WM_COMMAND:
{ if(LOWORD(wParam)== IDC_QUIT)
EndDialog(hDlg,TRUE);
HWND WndHandle;//定义句柄类型变量
}
}
return (FALSE);
}
int WINAPI WinMain(HINSTANCE hInst,HINSTANCE hInstPrev,LPSTR szcmdlind,int nCmdShow)
{
m_hDllSkin = LoadLibrary("SkinLoad.dll");
DialogBox (hInst,MAKEINTRESOURCE(IDD_MAINDLG),NULL,(DLGPROC)MainDlgProc);
return(0);
}