首页
社区
课程
招聘
OD插件编写的问题
发表于: 2011-8-8 22:51 3927

OD插件编写的问题

2011-8-8 22:51
3927
OLLYDBG.LIB用的是从这里下载的:http://bbs.pediy.com/showthread.php?t=31344

我用reimp和dlltool转换过,但是都不行。
请高手指点怎么解决LINK ERROR,谢谢了~~

E:\Code\C&C++\OD Plugin>ls
Makefile     OLLYDBG.LIB  Plugin.h     test.c       test.o

E:\Code\C&C++\OD Plugin>type Makefile
all:test.dll

test.dll:test.c
        gcc -c test.c
        gcc -o test.dll test.o -L.\ -lOLLYDBG

clean:
        del *.o
        del *.dll

E:\Code\C&C++\OD Plugin>make
gcc -c test.c
In file included from test.c:4:
plugin.h:100:1: warning: "_export" redefined
In file included from D:/Perl/site/lib/auto/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/windows.h:48,
                 from test.c:2:
D:/Perl/site/lib/auto/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/windef.h:138:1: warning: this is the location of the previous definition
test.c: In function `ODBG_Plugininit':
test.c:39: warning: passing arg 1 of `Registerpluginclass' from incompatible pointer type
test.c:39: warning: passing arg 4 of `Registerpluginclass' from incompatible pointer type
test.c: In function `ODBG_Plugindestroy':
test.c:73: warning: passing arg 1 of `Unregisterpluginclass' from incompatible pointer type
test.c: In function `CreateHelloWindow':
test.c:99: warning: passing arg 2 of `CreateWindowExA' from incompatible pointer type
gcc -o test.dll test.o -L.\ -lOLLYDBG
test.o:test.c:(.text+0x78): undefined reference to `Registerpluginclass'
test.o:test.c:(.text+0xa6): undefined reference to `AddtoList'
test.o:test.c:(.text+0xc2): undefined reference to `AddtoList'
test.o:test.c:(.text+0x165): undefined reference to `Unregisterpluginclass'
test.o:test.c:(.text+0x1c1): undefined reference to `CreateSolidBrush@4'
test.o:test.c:(.text+0x20e): undefined reference to `TextOutA@20'
test.o:test.c:(.text+0x21c): undefined reference to `DeleteObject@4'
test.o:test.c:(.text+0x27e): undefined reference to `Plugingetvalue'
D:/Perl/site/lib/auto/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../libmingw32.a(main.o):main.c:(.text+0x104): undefined reference to `WinMain@16'
collect2: ld returned 1 exit status
make: *** [test.dll] Error 1

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

收藏
免费 0
支持
分享
最新回复 (1)
雪    币: 32
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
用VC6写插件吧, 我也是mingw搞不过去,才换的

mingw的话, 我觉的把头文件改好就应该没问题了吧, 至于链接 -lOLLYDBG 应该是链接的 libOLLYDBG.lib 你把lib文件改一下名试试
2011-8-11 08:21
0
游客
登录 | 注册 方可回帖
返回