Thread: compile c code with makefile in windows prompt (gcc compiler)

  1. #1
    Registered User
    Join Date
    Feb 2015
    Posts
    1

    compile c code with makefile in windows prompt (gcc compiler)

    hi everyone! I have little to zero experience with c language; but i need to compile a code written in c which comes with a makefile
    can someone explain please how do i do that in windows command prompt?
    things i have done so far:
    installed minGW in C:\
    included path on user variables

    which files do i need to have in the same folder in order to create the exe ? and how do i have to wright it in command prompt?

    if any other info needed please ask me! ill try to explain!
    please help me! im desperate and i need this for an assignment in university

  2. #2
    Registered User
    Join Date
    Nov 2012
    Posts
    1,393
    MinGW usually installs a shortcut for the "MinGW shell" or "MinGW command prompt" or something similar. Personally I think this is better than using the Windows command prompt.

    As for learning to use gcc and make, I recommend looking at a good tutorial introduction to this. There are many resources to be found online. I found this one which covers the information you need. See section 2 which covers invoking make.

    https://www3.ntu.edu.sg/home/ehchua/.../gcc_make.html

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compile error with Makefile...
    By LockTim in forum C++ Programming
    Replies: 3
    Last Post: 09-11-2013, 11:04 AM
  2. Replies: 6
    Last Post: 09-18-2010, 08:45 PM
  3. Using a makefile to compile a program using SDL
    By Noerbo in forum Game Programming
    Replies: 9
    Last Post: 04-30-2006, 09:11 AM
  4. Compile via makefile?
    By Blackroot in forum C++ Programming
    Replies: 21
    Last Post: 01-21-2006, 12:00 AM
  5. C compiler that will compile C code with embedded sql
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 06-18-2002, 09:59 AM

Tags for this Thread