Using TDM gcc with Kali 2

This is an article for usage with avet, my antivirus evasion tool you can find here:

I had some trouble using mingw cross compiler. It should work fine, so I suggest you try that first.

But if you want an alternative, here is how to use tdm for windows with wine in kali (2016.2).

First, download from:

Update – On 64bit platforms you may execute first:
dpkg –add-architecture i386 && apt-get update && apt-get install wine32

Then install with wine:

# wine tdm64-gcc-5.1.0-2.exe

Then simply go through the gui installation:

After successful installation you can compile stuff for windows with:

wine gcc.exe mycode.c