Thread: make file

  1. #1
    Registered User
    Join Date
    Sep 2007

    make file

    Hi, we have been given an assignment in which we need to use procedures, functions, library routines etc. now there is a mainline file and a library file. we were told we should use "make" to compile it.
    say if the mainline code was called Image.c and the library code is called image_lib.c what command should i use to compile them and check to see if it works.

    Also im not sure if it is suppose to be image_lib.c or image_lib.h

    Any help would be appreciated

  2. #2
    Registered User
    Join Date
    Sep 2007
    It's Image_lib.h ....
    The make file , links the ep 100 libraries . Just typing make , and hitting enter should compile it.

  3. #3
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Cambridge, UK
    well, if you where told to use make command to compile the code, then make sure you have got makefile in the same directory(most of them time it would be in the same dir, if its not in the same dir, then you will have to raise few flag to specify the right path).

    From the above description i can see that you have the .h .c file. You will have to get the object file of your Image_lib.c file first and then link that with .o file with Image.o ending up with the .exe file.

    A makefile is an input to a make command. Without the make file you cannot do anything. So make sure u have the make file. If not you will have to create a makefile and then invoke make.

    Makefile contains a list of instruction on how to compile the code. If you hanv't looked at make file before i would suggest you go look at it and understand how to come up with your own make file.

    Here is a good link for that Makefile


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A development process
    By Noir in forum C Programming
    Replies: 37
    Last Post: 07-10-2011, 10:39 PM
  2. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  3. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 03:39 AM
  4. what does this mean to you?
    By pkananen in forum C++ Programming
    Replies: 8
    Last Post: 02-04-2002, 03:58 PM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 02:58 AM