DynamoRIO / drmemory

Memory Debugger for Windows, Linux, Mac, and Android
Other
2.44k stars 262 forks source link

Unable to build DrMemory with VS2012 #2045

Open mxmssh opened 7 years ago

mxmssh commented 7 years ago

I have the following compile errors when trying to build DrMemory with the latest changes: C:\drmemory\src2\dynamorio\ext\drreg\drreg.c(407): error C2275: uint: illegal use of this type as an expression C:\drmemory\src2\dynamorio\ext\drreg\drreg.c(407): error C2146: syntax error : missing ';' before identifier "aflags" C:\drmemory\src2\dynamorio\ext\drreg\drreg.c(407): error C2065: aflags: undeclared identifier C:\drmemory\src2\dynamorio\ext\drreg\drreg.c(413): error C2065: aflags: undeclared identifier C:\drmemory\src2\dynamorio\ext\drreg\drreg.c(418): error C2065: aflags: undeclared identifier

C:\drmemory\src2\drmemory\fastpath_x86.c(1576): error C2143: syntax error : missing ';' before 'type' C:\drmemory\src2\drmemory\fastpath_x86.c(1577): error C2065: 'opc' undeclared identifier C:\drmemory\src2\drmemory\fastpath_x86.c(1620): error C2065: opc: undeclared identifier C:\drmemory\src2\drmemory\fastpath_x86.c(1645): error C2065: opc: undeclared identifier C:\drmemory\src2\drmemory\fastpath_x86.c(3589): error C2143: syntax error : missing ';' before 'type' C:\drmemory\src2\drmemory\fastpath_x86.c(3590): error C2275: instr_t: illegal use of this type as an expression

derekbruening commented 7 years ago

We dropped VS2010 support and moved to VS2013 in general partly to match Appveyor (https://github.com/DynamoRIO/dynamorio/issues/2406) as well as to modernize. Thus, the continuous integration testing and the CDash bots are using VS2013 and are fine with C99 interspersed variable decls. If someone wants to support an older compiler it will likely be an uphill battle with the testing not helping.

mxmssh commented 7 years ago

"We dropped VS2010". What about VS2012 ?

derekbruening commented 7 years ago

Any compiler differences from the automated testing would have to be maintained manually by whoever wants to support that compiler. Appveyor and CDash used to run VS2010 and VS2013. We dropped VS2010, leaving only VS2013 run in the automated tests.

mxmssh commented 7 years ago

Ok, thank you for the answer. I tried to build using VS2013 and now have the following linkage error: drdecode.lib(opnd_shared.obj) : error LNK2005: _opnd_create_reg already define d in dynamorio.lib(dynamorio.dll) [C:\drmemory\build\dynamorio\clients\drcachesi m\drcachesim.vcxproj] drdecode.lib(opnd_shared.obj) : error LNK2005: _opnd_create_immed_int already defined in dynamorio.lib(dynamorio.dll) [C:\drmemory\build\dynamorio\clients\drc achesim\drcachesim.vcxproj] drdecode.lib(opnd_shared.obj) : error LNK2005: _opnd_create_base_disp already defined in dynamorio.lib(dynamorio.dll) [C:\drmemory\build\dynamorio\clients\drc achesim\drcachesim.vcxproj] drdecode.lib(opnd_shared.obj) : error LNK2005: _reg_resize_to_opsz already def ined in dynamorio.lib(dynamorio.dll) [C:\drmemory\build\dynamorio\clients\drcach esim\drcachesim.vcxproj] drdecode.lib(opnd_shared.obj) : error LNK2005: _opnd_uses_reg already defined in dynamorio.lib(dynamorio.dll) [C:\drmemory\build\dynamorio\clients\drcachesim\ drcachesim.vcxproj] drdecode.lib(decodelib.obj) : error LNK2005: _opnd_create_reg already defined in dynamorio.lib(dynamorio.dll) [C:\drmemory\build\dynamorio\clients\drcachesim\ drcachesim.vcxproj]