Results 1 to 2 of 2
I'm a newbie..
....working on a project in Linux OS
.... using C language.
....n using threads n sockets..
I need to make a "Makefile" for my files, so that ...
- 04-03-2007 #1
Unable to make Makefile.......
I'm a newbie..
....working on a project in Linux OS
.... using C language.
....n using threads n sockets..
I need to make a "Makefile" for my files, so that i don't have to compile each one separately.
I read some tutorials about make, wherein the hierarchy of files is mentions. But since , mine is in C language, all C files contain main(); and hierarchy is not observed..
I tried to make a Makefile using the bits of info.
But, when i run it, i get warnings and errors., mostly regarding multiple declaration of main.
1. Can i make a Makefile for C programs which are not interdependent[strongly].... like a makefile for server.c client.c display.c lan.c data.txt?
I'm also working with Qt:
With refrerence to it...
when i compile a program i use...
: qmake -project
qmake hello.pro
{Now the Makefile gets created automatically]
I just have to run :
: make
And i get a hello.o file ready.
: ./hello
runs successfully.
Is there anything like this for general C programs,.??
- 04-04-2007 #2
why do so? i believe you can use one main().
this is what i did in my previous work...
main.c --- clearly contain main()
server.c -- don't have any main - just functions replated to server
client.c -- just functions replated to server
created a make file.it worked well
- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------


Reply With Quote