📚 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  >>  IDA 4.9 Free SDK VC++2008 Express error C2059: syntax error

Topic created on: December 1, 2009 11:49 CST by minipc .

I want to develop an IDA plugin.  I have installed IDA 4.9 Free and IDA 4.9 SDK which I have patched appropriately after Woodmann.  I have setup a build environment after Micallef.  However, I have obviously messed up somewhere, because when I try to compile the template example "hello world" plugin, it fails

1>------ Rebuild All started: Project: whatever_you_like, Configuration: Release Win32 ------
1>Deleting intermediate and output files for project 'whatever_you_like', configuration 'Release|Win32'
1>Compiling...
1>appropriately.cpp
1>C:\Program Files\IDA Free\sdk\include\lines.hpp(697) : error C2059: syntax error : '='
1>C:\Program Files\IDA Free\sdk\include\lines.hpp(697) : error C2059: syntax error : ')'
1>Build log was saved at "file://d:\Visual Studio 2008\Projects\whatever_you_like\Release\BuildLog.htm"
1>whatever_you_like - 2 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


The line in lines.hpp that is generating the errors is

  APPEND(ptr, end, closing_comment());

and the APPEND macro is defined as follows

// append a string to the buffer checking the buffer size
#define APPEND(buf, end, name)                    \
  do                                              \
  {                                               \
    const char *__in = name;                      \
    while ( true )                                \
    {                                             \
      if ( buf >= end )                           \
      {                                           \
        buf = end-1;                              \
        buf[0] = '\0';                            \
        break;                                    \
      }                                           \
      if (( *buf = *__in++) == '\0' )             \
        break;                                    \
      buf++;                                      \
    }                                             \
  } while ( 0 )

which is basically how it's defined in the more recent 5.2 SDK.

I would be very grateful for some advice from anyone with more experience than me of any of IDA 4.9 Free, IDA 4.9 SDK, VCE++2008 or even C++.  Thanks :)

  minipc     December 1, 2009 20:11.48 CST
got the answer from a smart cookie at msdn - the __in symbol conflicts with an existing platform dk symbol, so needs to be renamed.  actually in the 5.2 version it is named __ida_in, so i had the answer all along, i just didn't realise:)

  minipc     December 1, 2009 20:14.35 CST
also in the same file (pro.h) there's an int i declaration that needs to be size_t i.  see if you can spot where it is?

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