Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile a C program?

I haven't done C in a long time. I'd like to compile this program, but I have no idea how to proceed. It seems like the makefile refers to GCC a lot and I've never used GCC.

I just want an executable that will run on windows.

like image 663
AngryHacker Avatar asked Nov 29 '22 12:11

AngryHacker


2 Answers

If it requires gcc and you want it to run on Windows, you could download Cygwin.

That's basically an emulator for GNU/Linux type stuff for Windows. It works with an emulation DLL.

http://www.cygwin.com/

like image 40
m0j0 Avatar answered Dec 01 '22 03:12

m0j0


You may need to install either cygwin or mingw, which are UNIX-like environments for Windows.

  • http://www.mingw.org/
  • http://www.cygwin.com/

When downloading/installing either cygwin or mingw, you will have the option of downloading and installing some optional features; you will need the following:

  • gcc (try version 2.x first, not 3.x)
  • binutils
  • GNU make (or gmake)
like image 146
vladr Avatar answered Dec 01 '22 02:12

vladr