📚 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  >>  Trouble linking plugin for IDA Pro Advanced 64-bit

Topic created on: September 2, 2010 12:47 CDT by timtoady .

Hello All,

I could really use your help on this one.  I am trying to develop a plugin for IDA.  I am using VS 2008 for development and version 5.3 of the IDA SDK.  I have configured VS as recommended in the instructions included with the SDK.  I also was careful to create an x64 configuration with libvc.w64 and libvc.x64 selected as additional library directories in the project properties.  I define __NT__, __IDP__ and __EA64__ to the preprocessor as I have seen in the makefiles but have had no results.  I have also tried declaring every permutation of __EA64__, __AMD64__ and __X64__ to no avail. The code I am using is a simple 'hello world' program and appears in [1] below.  When I build for Win32 everything works fine.  That is, it compiles, links and executes in IDA Advanced 32-bit.  When I build for x64 it compiles but flags the following linker error:


error LNK2001: unresolved external symbol __imp_callui


This function looks like it is exported in a few static libraries (ida.a and pro.a in all the libgcc directories located at the root of the SDK directory) but strangely isn't an issue when building for Win32.  I have also tried the VS2005 Solution templates listed at [2] but these actually gave me poorer results.  I was convinced it was just a goofy path statement on my part but I believe I have tried everything, not to mention the fact that Google has precisely zero results for __imp_callui.

Thank you in advance for any insight you can provide.


Kind regards,

-J

EDIT: Formatting
EDIT: Linker directories

[1] http://www.codebreakers-journal.com/downloads/cbj/2005/CBJ_2_1_2005_Callief_IDA.pdf
[2] http://www.hex-rays.com/contest2009/

  jduck     September 2, 2010 21:36.56 CDT
It looks like for 64-bit you'll have to use both the lib/vc.x64 and lib/vc.w64 directories. Keep in mind, you'll need to run the 64-bit version of IDA to test.

  timtoady   September 3, 2010 13:04.10 CDT
> jduck: It looks like for 64-bit you\'ll have to use both the lib/vc.x64 and lib/vc.w64 directories. Keep in mind, you\'ll need to run the 64-bit version of IDA to test.

I have tried specifying the libvc.w64 and libvc.x64 as additional library directories in the project properties (I alluded to this above when I mentioned the linker include settings) and am of course prepared to test with IDA Advanced 64-Bit once it actually builds.

-J

  jduck     September 3, 2010 16:31.36 CDT
One notable thing to mention is that Visual Studio does not install the x64 build tools by default. You should be able to create an x64 configuration via the Configuration Manager in VS. If you want to use the command line, be sure to use the amd64/x64 version.

  timtoady   September 3, 2010 17:34.05 CDT
> jduck: One notable thing to mention is that Visual Studio does not install the x64 build tools by default. You should be able to create an x64 configuration via the Configuration Manager in VS. If you want to use the command line, be sure to use the amd64/x64 version.

I specifically mention in the original post that I create an  x64 configuration.

-J

  jduck     September 3, 2010 19:19.39 CDT
Sorry for not re-reading, heh.

I recommend contacting Hex-Rays support. Of course, that will likely mean updating to 5.7 and will require a legit license.

  timtoady   September 8, 2010 10:31.35 CDT
> I recommend contacting Hex-Rays support.

I was afraid you would say that.  Thank you for trying.

-J

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