鱼C论坛

 找回密码
 立即注册
查看: 2938|回复: 0

求教 C语言错误error LNK2001: unresolved external symbol "public:

[复制链接]
发表于 2013-11-26 19:44:16 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
代码
#include "stdafx.h"
#include "keyboardhook.h"
int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{

    KeyBoardHook kbh;
    char dll_path[MAX_PATH];
    ::GetModuleFileName(NULL,dll_path,sizeof(dll_path));
    char *pos=strrchr(dll_path,'\\');
    if(pos==NULL) return 0;
    strcpy(pos,"\\\0\0");
    strcat(dll_path,"hookdll.dll");
    strcpy(kbh.KBINFO.Dll_path,dll_path);
    strcpy(kbh.KBINFO.Key,"*");
    kbh.KBINFO.MaxDataLen=1;
    kbh.SetKBHookType(3);   
    strcpy(kbh.KBINFO.Savepath,"c:\\kb.txt");
    kbh.Start();
    while(true) Sleep(1000);
        return 0;
}

错误 提示
error LNK2001: unresolved external symbol "public: int __thiscall KeyBoardHook::Start(void)" (?Start@KeyBoardHook@@QAEHXZ)

error LNK2001: unresolved external symbol "public: void __thiscall KeyBoardHook::SetKBHookType(int)" (?SetKBHookType@KeyBoardHook@@QAEXH@Z)

error LNK2001: unresolved external symbol "public: virtual __thiscall KeyBoardHook::~KeyBoardHook(void)" (??1KeyBoardHook@@UAE@XZ)

error LNK2001: unresolved external symbol "public: __thiscall KeyBoardHook::KeyBoardHook(void)" (??0KeyBoardHook@@QAE@XZ)

error LNK2001: unresolved external symbol _main

fatal error LNK1120: 5 unresolved externals

大侠帮帮忙
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-11-22 21:06

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表