visual studio 2012 - Compilation of detours on vs2012 (Windows 8.1) -


using visual studio 2012 command tools (i.e. in 'native tools command prompt' command console) have run vcvars32.bat, , navigated *c:\program file(x86)\microsoft research\detours express 3.0*.

on running nmake in directory, begins building successfully, exits error:

cl /nologo /nologo /zi /mt /gm- /w4 /wx /od /ddetours_bits=32 /i..\..\include /gs /ddetours_x86=1 /ddetours_32bit=1 /d_x86_ /ddetours_option_bits=64 /fdobj.x86\vc.pdb /foobj.x86\member.obj /c member.cpp  member.cpp member.cpp(88) : error c2440: 'type cast' : cannot convert 'void (__thiscall cmember::* )(void)' 'pbyte &' reason: cannot convert 'overloaded-function' 'pbyte *' there no context in conversion possible   member.cpp(90) : error c2440: 'type cast' : cannot convert 'void (__thiscall cdetour::* )(void)' 'pbyte &' reason: cannot convert 'overloaded-function' 'pbyte *' there no context in conversion possible  // error repeated member.cpp lines 105, 120, 122.  nmake : fatal error u1077: '"c:\program files (x86)\microsoft visual studio 11.0\vc\bin\nmake.exe"' : return code '0x2' stop. 

not sure how move on error. attempted to:

set detours_target_processor=x86 

and "nmake clean" followed new "nmake" - results in same error.

as specified in title, building vs2012, on windows 8.1 box (x64).

thank you

ok, solved it, thought i'd post answer if else finds useful.

i've done trial , error, still come on , explain why/what error , caused etc.

however, here changes made compile:

#if (_msc_ver < 1310)     pftarget = cmember::target;     pfmine = cdetour::mine_target;      verify("cmember::target", *(pbyte*)&pftarget);     verify("*cdetour::real_target", *(&(pbyte&)cdetour::real_target));     verify("cdetour::mine_target", *(pbyte*)&pfmine); #else     //verify("cmember::target", (pbyte)(&(pbyte&)cmember::target));     //verify("*cdetour::real_target", *(&(pbyte&)cdetour::real_target));     //verify("cdetour::mine_target", (pbyte)(&(pbyte&)cdetour::mine_target));      pftarget = &cmember::target;     pfmine = &cdetour::mine_target;      verify("cmember::target", *(pbyte*)&pftarget);     verify("*cdetour::real_target", *(&(pbyte&)cdetour::real_target));     verify("cdetour::mine_target", *(pbyte*)&pfmine); #endif 

my changes in 2nd half 'else' statement, original code commented out.

for each error (relevant line numbers in original question) - commented out there, copied , pasted 1st half "if" section", changed "pftarget = cmember::target;" "pftarget = &cmember::target;" (based on instruction compiler).

seems 2 different issues, first taking wrong path in if/else block (_msc_ver supposed set somewhere , isn't?) , secondly required change cmember::target &cmember::target.

thanks


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -