wavestone-cdt / EDRSandblast

1.46k stars 272 forks source link

Feature Request: MinGW compatibility #7

Closed sempervictus closed 7 months ago

sempervictus commented 2 years ago

Trying to build under mingw (on linux), i'm having to downcase some headers and seeing macro definitions fail a la:

Includes/DriverOps.h:12:66: error: expected ‘)’ before ‘__FUNCTION__’
   12 | #define PRINT_ERROR_AUTO(func) (_tprintf(TEXT("[!] ERROR ") TEXT(__FUNCTION__) TEXT(" ; ") func TEXT(" (0x%08x)\n"), GetLastError()))
      |                                                                  ^~~~~~~~~~~~
Utils/DriverOps.c:74:21: note: in expansion of macro ‘PRINT_ERROR_AUTO’
   74 |                     PRINT_ERROR_AUTO(TEXT("CreateService"));
      |                     ^~~~~~~~~~~~~~~~
In file included from Utils/DriverOps.c:12:
Includes/DriverOps.h:12:41: note: to match this ‘(’
   12 | #define PRINT_ERROR_AUTO(func) (_tprintf(TEXT("[!] ERROR ") TEXT(__FUNCTION__) TEXT(" ; ") func TEXT(" (0x%08x)\n"), GetLastError()))
      |                                         ^
Utils/DriverOps.c:74:21: note: in expansion of macro ‘PRINT_ERROR_AUTO’
   74 |                     PRINT_ERROR_AUTO(TEXT("CreateService"));
      |                     ^~~~~~~~~~~~~~~~
In file included from /usr/x86_64-w64-mingw32/include/minwindef.h:163,
                 from /usr/x86_64-w64-mingw32/include/windef.h:9,
                 from /usr/x86_64-w64-mingw32/include/windows.h:69,
                 from Utils/DriverOps.c:7:

still trying to nail down all the include paths, but guessing that anything i come up w/ is going to be rather hacky compared to actual author implementation. Would be a very nice feature to have if you have the cycles to implement. Thanks for the awesome code - highly informative.

themaks commented 2 years ago

Hi ! We acknowledged the issue, but we are currently working on a substantive refactoring of the project; we’ll consider solving this after, thanks for your understanding ;)

themaks commented 11 months ago

Hi! Sorry we did not get back at you sooner. The refactoring did happened soon after my last comment.

If you could provide us with configuration/scripts to test compilation with mingw, that'd be great! To be fully honest, I don't think this as an urgent issue (unless multiple other users say otherwise), so I'd be happy if we could solve this with the lowest amount of effort as possible :D

Cheers, and thanks for your issue

themaks commented 7 months ago

Closing this for now