In theory, you could mix compilers, but in practice, from time to time you will have an object file format and standard problems with mixing libraries, especially on 32-bit Windows. It would be hard, but not so bad in other places, since most things are based on de facto standards such as MSVC and gcc.
Win32: use dmC ++ (digital mars compiler and C runtime) with dmd OR g ++ and gdc. Other combinations may be made, but erratic. The best way to mix code in Win32 across compiler families is to build a DLL with a C or COM api and use this from D.
Win64: Since dmd uses Microsoft's 64-bit format and the C library, you should have a bit of trouble mixing dmd with Visual C ++ code. I am not sure about g ++ on Windows64 with dmd.
Most other platforms, including Linux: dmd works well with g ++, like gdc + gcc. I'm not sure if ldc and g ++ are compatible, but ldc should work fine with other LLVM-based compilers on any platform.
source share