BoiBetter / qira

Automatically exported from code.google.com/p/qira
0 stars 0 forks source link

mingw compile error #13

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Did you run into this issue using your mingw_build.sh script?

In file included from idasdk65/include/ida.hpp:11:0,
                 from template.cpp:1:
idasdk65/include/pro.h:610:84: error: declaration of C function ‘int 
_memicmp(const void*, const void*, size_t)’ conflicts with
 idaman THREAD_SAFE int ida_export memicmp(const void *x, const void *y, size_t size);
                                                                                    ^
In file included from idasdk65/include/pro.h:99:0,
                 from idasdk65/include/ida.hpp:11,
                 from template.cpp:1:
/usr/share/mingw-w64/include/string.h:38:23: error: previous declaration ‘int 
_memicmp(const void*, const void*, size_t)’ here
   _CRTIMP int __cdecl _memicmp(const void *_Buf1,const void *_Buf2,size_t _Size);

In the idasdk I see:

// non standard functions are missing:
#ifdef _MSC_VER
#if _MSC_VER <= 1200
#define for if(0) ; else for  // MSVC is not compliant to the ANSI standard :(
#else
#pragma warning(disable : 4200) // zero-sized array in structure (non accept 
from cmdline)
#endif
// visual studio deprecated posix names but it seems that there is no good
// reason for that. the following definitions are to shut up visual studio
#define chdir  _chdir
#define fileno _fileno
#define getcwd _getcwd
#define memicmp _memicmp
#endif

#ifdef __GNUC__
idaman THREAD_SAFE int ida_export memicmp(const void *x, const void *y, size_t 
size);
#endif

Original issue reported on code.google.com by fuzzfor...@gmail.com on 3 Sep 2014 at 2:14

GoogleCodeExporter commented 8 years ago
Compiles if I change:

#define memicmp _memicmp

to

#define memicmp anything

Original comment by fuzzfor...@gmail.com on 3 Sep 2014 at 6:46

GoogleCodeExporter commented 8 years ago
I also had to modify mingw_build.sh and add the "-static" flag otherwise mingw 
was pulling in libwinpthread-1.dll and then IDA would fail to load the QIRA 
plugin.

Original comment by fuzzfor...@gmail.com on 4 Sep 2014 at 12:16

GoogleCodeExporter commented 8 years ago
Create a pull request on github! https://github.com/BinaryAnalysisPlatform/qira

Original comment by geo...@gmail.com on 16 Sep 2014 at 8:53