-
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
thanks
-
It's Image_lib.h ....
The make file , links the ep 100 libraries . Just typing make , and hitting enter should compile it.
-
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
ssharish