1

I have a simple C program that uses only basic stdio calls (single-threaded file I/O), which I compile on a Mac under clang.

Will this run under Windows? If not, how do I compile it to run under Windows?

kdog
  • 1,583
  • 16
  • 28
  • Possible duplicate of [Howto compile for Windows on Linux with gcc / g++?](http://stackoverflow.com/questions/2033997/howto-compile-for-windows-on-linux-with-gcc-g) – nobody May 14 '16 at 13:33
  • That question addressed compiling from Linux using gcc. My question involves compiling from a Mac using clang. I don't understand why you believe these are duplicates. – kdog May 14 '16 at 13:59
  • You could install `VirtualBox` for free and install Windows in there and compile it without sullying your Mac with any Microsoft software. – Mark Setchell May 14 '16 at 14:25
  • @kdog Just read it. The same cross-compiler toolchain is available for both. The minute details of how to install it may be different, but that's easy enough to research given the name. – nobody May 14 '16 at 15:10

1 Answers1

2

You can use ELLCC, a clang based compiler toolchain, to cross compile Windows and Linux executables on a Mac.

Richard Pennington
  • 19,673
  • 4
  • 43
  • 72