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 28,224 total registered users.


Recently Created Topics
Reverse Engineering ...
Jan/23
Career: DoD Agency I...
Jan/22
"Disappearing&q...
Jan/17
Career: Software Sec...
Jan/11
Where is the call st...
Jan/07
IDA Pro 6.1 Breakpoi...
Jan/01
How to create data s...
Dec/30
can i search all mod...
Dec/23
IDA symbol table exp...
Dec/20
An anti-attach trick
Dec/17


Recent Forum Posts
Reverse Engineering ...
NirIzr
"Disappearing&q...
NirIzr
Reverse Engineering ...
charlie
"Disappearing&q...
charlie
An anti-attach trick
Bass
An anti-attach trick
waleeda...
An anti-attach trick
Bass
An anti-attach trick
waleeda...
An anti-attach trick
Bass
Looking for value in...
NirIzr


Recent Blog Entries
cmathieu
Feb/07
Hacker Carnival

waleedassar
Feb/06
OllyDbg v1.10 And Hardware ...

waleedassar
Jan/31
Yet Another Anti-Debug Trick

RolfRolles
Jan/22
Finding Bugs in VMs with a ...

waleedassar
Jan/13
An OllyDbg Bug Disables Sof...

More ...


Recent Blog Comments
waleedassar on:
Feb/07
OllyDbg v1.10 And Hardware ...

NirIzr on:
Feb/07
OllyDbg v1.10 And Hardware ...

NirIzr on:
Feb/05
Yet Another Anti-Debug Trick

trolotou on:
Feb/05
Doudoune Moncler -Pennies F...

waleedassar on:
Feb/01
Yet Another Anti-Debug Trick

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit