📚 OpenRCE is preserved as a read-only archive. Launched at RECon Montreal in 2005. Registration and posting are disabled.








Flag: Tornado! Hurricane!

 Forums >>  IDA Pro  >>  Plug-In Compilation Issue

Topic created on: January 6, 2008 14:42 CST by jcohen .

It's my first time writing a extension for IDA, and I am get a linker error that I do not know how to resolve.

1>LINK : error LNK2001: unresolved external symbol PLUGIN

I am writing a loader, and am using MS Visual C++ 2008 Express Edition. I configured it according to the settings in the readme of the SDK.

I am guessing that there is some sort of linker dependency that I am missing, but I can't figure out what. Does anyone know how to resolve the above error?

Thanks.

  jcohen   January 6, 2008 15:41.50 CST
I've figured out that this error comes from the
/EXPORT:PLUGIN command line option in the linker options. Removing that will allow my loader to compile successfully. So, is that command line option necessary? What does it do specifically?

  codepupil     January 6, 2008 18:04.08 CST
As far as I know its how IDA is able to load your plugin.  
not sure if you read http://www.openrce.org/reference_library/files/ida/idapw.pdf but it was a real help to me when I wrote my first  plugin.

  jcohen   January 7, 2008 00:24.21 CST
thanks, i've read the guide, but couldn't figure out how to resolve my error. my build environment is configured according to the directions in the guide

hmmm so IDA freezes when i try to use the loader compiled without the /EXPORT:PLUGIN command line option, and when I compile with it I get that linker error above.

am i missing some library that this needs to be linked against?

  PSUJobu     January 7, 2008 05:16.22 CST
Your plugin should have a structure named "PLUGIN" -- the symbol that is exported by /EXPORT.  See any of the sample plugins that come with the IDA SDK -- they provide a useful template for cut & paste...

  cseagle     January 9, 2008 11:20.16 CST
Since you are writing a loader and NOT a plugin, you should not be exporting the PLUGIN struct, instead, you should be exporting the LDSC struct.  Try changing your export to /EXPORT:LDSC.  You did define a loader_t named LDSC didn't you?  Also, change the output file extension to .ldw (rather than .plw)

Chris

  serenade     January 12, 2008 04:30.30 CST
It seems you have done
#define __NT__
#define __IDP__
and add include Path
%SDK%\include;%SDK%\ldr
and link with
%SDK%\libvc.w32\ida.lib

then try to use Visual Studio 2005 or lower version VC++.
Because when I compile a loader on VS2008, I fail like you; but when I do the same on VS2005,it works.

  PSUJobu     January 14, 2008 06:48.00 CST
> cseagle: Since you are writing a loader and NOT a plugin

Oops, missed that important point!  Chris is right, of course... Sorry for the bad advice!  :(

Note: Registration is required to post to the forums.

There are 31,328 total registered users.


Recently Created Topics
[help] Unpacking VMP...
Mar/12
Reverse Engineering ...
Jul/06
let 'IDAPython' impo...
Sep/24
set 'IDAPython' as t...
Sep/24
GuessType return une...
Sep/20
About retrieving the...
Sep/07
How to find specific...
Aug/15
How to get data depe...
Jul/07
Identify RVA data in...
May/06
Question about memor...
Dec/12


Recent Forum Posts
Finding the procedur...
rolEYder
Question about debbu...
rolEYder
Identify RVA data in...
sohlow
let 'IDAPython' impo...
sohlow
How to find specific...
hackgreti
Problem with ollydbg
sh3dow
How can I write olly...
sh3dow
New LoadMAP plugin v...
mefisto...
Intel pin in loaded ...
djnemo
OOP_RE tool available?
Bl4ckm4n


Recent Blog Entries
halsten
Mar/14
Breaking IonCUBE VM

oleavr
Oct/24
Anatomy of a code tracer

hasherezade
Sep/24
IAT Patcher - new tool for ...

oleavr
Aug/27
CryptoShark: code tracer ba...

oleavr
Jun/25
Build a debugger in 5 minutes

More ...


Recent Blog Comments
nieo on:
Mar/22
IAT Patcher - new tool for ...

djnemo on:
Nov/17
Kernel debugger vs user mod...

acel on:
Nov/14
Kernel debugger vs user mod...

pedram on:
Dec/21
frida.github.io: scriptable...

capadleman on:
Jun/19
Using NtCreateThreadEx for ...

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit