473,513 Members | 3,208 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem with a makefile

http://rafb.net/paste/results/zJOE1P93.html

it's all there! any help would be appreciated..
bye!

p.s. but sure i can paste it here too! :)
START FILE:

all: client server
server: server.o mymutex.o error.o changedir.o
gcc -o server -lpthread server.o mymutex.o error.o changedir.o

server.o: server.c error.h debug.h defines.h server.h
gcc -g -DDEBUG -c server.c

client: client.o mymutex.o copia.o error.o
gcc -o client -lpthread client.o mymutex.o copia.o error.o c_transfer.o

client.o: client.c client.h
gcc -g -DDEBUG -DCLIENT -c client.c

c_transfer.o: c_transfer.c client.h
gcc -g -DDEBUG -DCLIENT -c c_transfer.c

mymutex.o: mymutex.c mymutex.h server.h
gcc -g -DDEBUG -c mymutex.c

error.o: error.c error.h debug.h defines.h server.h
gcc -g -DDEBUG_ERROR -c error.c

copia.o: copia.c error.h debug.h defines.h
gcc -g -DDEBUG -DCLIENT -c copia.c

changedir.o: changedir.c error.h debug.h defines.h server.h
gcc -g -DDEBUG -DCLIENT -c changedir.c
clean:
/bin/rm -f client server client.o server.o mymutex.o copia.o changedir. o c_transfer.o

END FILE

this is the error:
faz@debian:/progetto/prova2$ make
gcc -g -DDEBUG -DCLIENT -c client.c
client.c: In function `main':
client.c:155: warning: assignment makes pointer from integer without a cast
gcc -g -DDEBUG -c mymutex.c
gcc -g -DDEBUG -DCLIENT -c copia.c
gcc -o client -lpthread client.o mymutex.o copia.o error.o c_transfer.o
gcc: c_transfer.o: No such file or directory
make: *** [client] Error 1

so... why it can't found c_transfer.o? seems like is not been compiled..
Mar 9 '06 #1
4 1680
In article <pa****************************@hotmail.com>,
fabio <fa*****@hotmail.com> wrote:
p.s. but sure i can paste it here too! :)
START FILE: all: client server


Makefiles are not part of the C standard, and discussions of make
are better made in a newsgroup specific to your programming
environment or specific to the tool suite you are using.
--
Programming is what happens while you're busy making other plans.
Mar 9 '06 #2
In article <du**********@canopus.cc.umanitoba.ca>,
Walter Roberson <ro******@ibd.nrc-cnrc.gc.ca> wrote:
In article <pa****************************@hotmail.com>,
fabio <fa*****@hotmail.com> wrote:
all: client server Makefiles are not part of the C standard


Off-topic:
client: client.o mymutex.o copia.o error.o
gcc -o client -lpthread client.o mymutex.o copia.o error.o c_transfer.o


Notice you are creating "client" based upon several .o files, but
not all of the .o files are listed as dependancies in the "client:" line.
--
"No one has the right to destroy another person's belief by
demanding empirical evidence." -- Ann Landers
Mar 9 '06 #3
fabio <fa*****@hotmail.com> writes:
http://rafb.net/paste/results/zJOE1P93.html

it's all there! any help would be appreciated..
bye!

p.s. but sure i can paste it here too! :)
START FILE:

all: client server [snip] clean:
/bin/rm -f client server client.o server.o mymutex.o copia.o changedir. o c_transfer.o

END FILE this is the error:
faz@debian:/progetto/prova2$ make
gcc -g -DDEBUG -DCLIENT -c client.c
client.c: In function `main':
client.c:155: warning: assignment makes pointer from integer without a cast
gcc -g -DDEBUG -c mymutex.c
gcc -g -DDEBUG -DCLIENT -c copia.c
gcc -o client -lpthread client.o mymutex.o copia.o error.o c_transfer.o
gcc: c_transfer.o: No such file or directory
make: *** [client] Error 1

so... why it can't found c_transfer.o? seems like is not been compiled..


Sorry, we don't do Makefiles here. You might try
comp.unix.programmer. (I think I see the problem, but I'm not going
to go into the details in this newsgroup; if you post to
comp.unix.programmer, I'll answer there if somebody else doesn't beat
me to it. <OT>Hint: Ask yourself whether "client" depends on
"c_transfer.o", and if so, whether you've said so.</OT>)

You should fix the warning in client.c. You haven't shown us the C
source, so it's impossible to be certain, but a common cause of that
message is that you're calling malloc() without the required
"#include <stdlib.h>". (Resist the temptation to correct the problem
by adding a cast; that would mask the error without fixing it.)

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Mar 9 '06 #4
Il Thu, 09 Mar 2006 21:37:45 +0000, Walter Roberson ha scritto:
In article <du**********@canopus.cc.umanitoba.ca>,
Walter Roberson <ro******@ibd.nrc-cnrc.gc.ca> wrote:
In article <pa****************************@hotmail.com>,
fabio <fa*****@hotmail.com> wrote:

all: client server
Makefiles are not part of the C standard


Off-topic:
client: client.o mymutex.o copia.o error.o
gcc -o client -lpthread client.o mymutex.o copia.o error.o c_transfer.o


Notice you are creating "client" based upon several .o files, but
not all of the .o files are listed as dependancies in the "client:" line.


Oh yes, i see..
thx both of you for response, and sorry if i was off-topic!
Bye!

Mar 10 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3610
by: smsabu2002 | last post by:
Hi, I am facing the build problem while installing the DBD-MySql perl module (ver 2.9008) using both GCC and CC compilers in HP-UX machine. For the Build using GCC, the compiler error is...
2
1423
by: Ralf Propach | last post by:
I have a visual studio 2005 project that consists of two managed C++ classes and some unmanaged C functions. The output of this project is a dll, that is loaded by a program with LoadLibrary()....
1
5430
by: Arsalan Ahmad | last post by:
Hi all, I am trying to compile some source files using makefile. While compiling I am getting errors as shown below. Any idea how can I solve this problem. I believe I need to add some...
3
3379
by: abhi | last post by:
I am using MinGW compiler for creating a Chat Client in C. Whenever i use any function of winsock2, my program does not compile and it gives linker Error. What could be wrong? I have included...
6
1885
by: dolphin | last post by:
Hi! I am learing makefile recently.Now I have a problem. I write a very simple program just like "hello world" I write two makefile for it.One is included in another. the first is makefile...
1
2041
by: %NAME% | last post by:
I wish to put a number of .db2 scripts in my makefile. However, some of the db2 scripts tries to revoke privileges from users that might do not have that privilege already, thus returns an error...
4
3942
by: Jess | last post by:
Hello, I am now trying to use makefile to compile C++ programs. My makefile looks like: f1.o : f1.cpp h1.h h2.h g++ -c f1.cpp f2.o : f2.cpp h2.h h3.h g++ -c f2.cpp
9
1736
by: raju2000myin | last post by:
i wrote one makefile but it shows multiple definition error how can i resolve that problem it is urgent to me please help to me............. ramesh............
1
1488
by: Sejoro | last post by:
I fixed the operand problem (thanks) and now a new one has risen up. I have to compile it with a makefile which I have made and I am getting more strange errors I don't know how to fix. Well,...
19
4380
by: foolsmart2005 | last post by:
I have written a snake game. There are 2 levels in the game(I finished 1st level). It can run in VC++ without problem but, when I run it on the dev C++ 4.9.9.2, it cannot run. I want to...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5079
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.